annotate lisp/term/internal.el @ 26245:2dbd5efce8ee

(whitespace-version): Update to 2.6 (whitespace-display-in-modeline): Add custom variable to control displaying the whitespace errors on the modeline based on suggestion from <klaus.berndl@sdm.de> (whitespace-buffer): Now returns `t' if unclean and `nil' if clean, to enable using as a hook function, as suggested by Puneet Goel <puneet@computer.org> (whitespace-buffer): Fix a subtle bug that cleaned up only if quiet was not set, even with whitespace-auto-cleanup set. (whitespace-mode-line): Now uses less modeline real estate and shows whitespaces as W:<x>!<y> where <x> is any type of whitespace which is present in the file, and <y> is any type of whitespace whose check has been suppressed by setting `whitespace-check-<whitespace-type>' to nil. (whitespace-unchecked-whitespaces): New function to return the list of whitespaces for whom checks have been suppressed. (whitespace-display-unchecked-whitespaces): Renamed to `whitespace-update-modeline' to reflect its functionality. (whitespace-version): Update to 2.5
author Gerd Moellmann <gerd@gnu.org>
date Sat, 30 Oct 1999 19:20:53 +0000
parents 87e4cdfac07b
children 9f3d02d7daa8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19871
847fbc8725a9 Switch to raw-text as coding system.
Richard M. Stallman <rms@gnu.org>
parents: 19566
diff changeset
1 ;;; internal.el --- support for PC internal terminal -*- coding: raw-text; -*-
5444
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
3 ;; Copyright (C) 1993, 1994, 1998 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>
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7 ;; This file is part of GNU Emacs.
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9 ;; 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
10 ;; 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
11 ;; the Free Software Foundation; either version 2, or (at your option)
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; any later version.
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14 ;; 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
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; GNU General Public License for more details.
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18
e65b4acb9e6a entered into RCS
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
14170
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 13483
diff changeset
20 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 13483
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 13483
diff changeset
22 ;; Boston, MA 02111-1307, USA.
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 13483
diff changeset
23
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 13483
diff changeset
24 ;;; Code:
23cc3f54e536 Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents: 13483
diff changeset
25
5444
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)
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
50
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
51 ;; ----------------------------------------------------------------------
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
52 ;; DOS display setup
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
53 ;; =================
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
54 ;;
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
55 ;; DOS can only support a single font. On most systems (with the
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
56 ;; possible exception of Far Eastern DOS versions), this means that
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
57 ;; two character sets are available at any given time: the ASCII
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
58 ;; charset, and a single national charset, usually mapped to codes
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
59 ;; above 128 (i.e., with 8th bit set). Which national charset is
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
60 ;; supported depends on the codepage loaded by the system when it
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
61 ;; boots; usually, this codepage cannot be changed without
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
62 ;; rebooting.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
63 ;;
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
64 ;; Since each codepage can usually display character of a single
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
65 ;; MULE charset, Emacs can display a single MULE charset with the
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
66 ;; glyphs of the current codepage. The mapping from DOS codepages
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
67 ;; to MULE charsets is established by the charset property of the
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
68 ;; cpNNN-decode-table variables in codepage.el, which also
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
69 ;; defines translation tables for each such pair, and a bunch of
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
70 ;; functions to generate coding systems that use those translation
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
71 ;; tables to convert codepage-encoded text to the appropriate MULE
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
72 ;; charset and back. When Emacs starts on DOS, it automatically
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
73 ;; sets its default coding systems for file I/O and terminal output
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
74 ;; according to the currend DOS codepage, given by the
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
75 ;; `dos-codepage' variable.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
76 ;;
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
77 ;; This leaves us with the problem of displaying character sets
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
78 ;; other than the one which maps directly into the current codepage.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
79 ;; The following functions and variables handle this nuisance by
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
80 ;; defining a display table where each character that doesn't have a
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
81 ;; glyph in some codepage is mapped to a string which represents it.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
82 ;; For example, a small c with cedilla is mapped to the string
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
83 ;; "{,c}" (the braces serve as a sign that this is a single
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
84 ;; character). A nice feature of the display tables is that Emacs
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
85 ;; knows that the string represents a single character, and thus
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
86 ;; cursor motion works as you'd expect: a single `C-f' moves past
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
87 ;; the entire string which represents a single character.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
88 ;; ----------------------------------------------------------------------
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
89
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
90 (defvar IT-character-translations
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
91 '(
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
92 (latin-iso8859-1
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
93 . [255 "!I" "|c" "Pd" "$$" "Ye" "|" "SE" "\"" "(c)"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
94 "_a" "<<" "~" "--" "(R)" "'-" "^o" "+-" "^2" "^3"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
95 "'" "u" ".P" "^." "'," "^1" "_o" ">>" "1/4" "1/2"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
96 "3/4" "?I" "`A" "A'" "A^" "~A" "\"A" "Ao" "AE" ",C"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
97 "`E" "E'" "E^" "\"E" "`I" "I'" "I^" "\"I" "D-" "~N"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
98 "`O" "O'" "O^" "~O" "\"O" "*x" "/O" "`U" "U'" "U^"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
99 "\"U" "Y'" "TH" "ss" "`a" "a'" "a^" "~a" "\"a" "ao"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
100 "ae" ",c" "`e" "e'" "e^" "\"e" "`i" "i'" "i^" "\"i"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
101 "d-" "~n" "`o" "o'" "o^" "~o" "\"o" "-:" "/o" "`u"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
102 "u'" "u^" "\"u" "y'" "th" "\"y"]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
103 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
104 (latin-iso8859-2
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
105 . [255 "A;" "'(" "/L" "$$" "L<" "S'" "SE" "\"" "S<"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
106 ",S" "T<" "Z'" "--" "Z<" "Z^." "^o" "a;" "';" "/l"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
107 "'" "l<" "s'" "'<" "'," "s<" ",s" "t<" "z'" "'"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
108 "z<" "z^." "R'" "A'" "A^" "A(" "\"A" "L'" "C'" ",C"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
109 "C<" "E'" "E;" "E:" "E<" "I'" "I^" "D<" "/D" "N'"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
110 "N<" "O'" "O^" "O''" "\"O" "*x" "R<" "U^0" "U'" "U''"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
111 "\"U" "Y'" ",T" "ss" "r'" "a'" "a^" "a(" "\"a" "l'"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
112 "c'" ",c" "c<" "e'" "e;" "\"e" "e<" "i'" "i^" "d<"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
113 "/d" "n'" "n<" "o'" "o^" "o''" "\"o" "-:" "r<" "u^0"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
114 "u'" "u''" "\"u" "y'" ",t" "'."]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
115 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
116 (latin-iso8859-3
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
117 . [255 "/H" "'(" "Pd" "$$" " " "H^" "SE" "\"" "I^."
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
118 ",S" "G(" "J^" "--" " " "Z^." "^o" "/h" "^2" "^3"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
119 "'" "u" "h^" "." "'," "i^." ",s" "g(" "j^" "1/2"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
120 " " "z^." "`A" "A'" "A^" " " "\"A" "C^." "C^" ",C"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
121 "`E" "E'" "E^" "\"E" "`I" "I'" "I^" "\"I" " " "~N"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
122 "`O" "O'" "O^" "G^." "\"O" "*x" "G^" "`U" "U'" "U^"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
123 "\"U" "U(" "S^" "ss" "`a" "a'" "a^" " " "\"a" "c^."
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
124 "c^" ",c" "`e" "e'" "e^" "\"e" "`i" "i'" "i^" "\"i"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
125 " " "~n" "`o" "o'" "o^" "g^." "\"o" "-:" "g^" "`u"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
126 "u'" "u^" "\"u" "u(" "s^" "^."]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
127 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
128 (latin-iso8859-4
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
129 . [255 "A;" "kk" ",R" "$$" "?I" ",L" "SE" "\"" "S<"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
130 "E-" ",G" "/T" "--" "Z<" "'-" "^o" "a;" "';" ",r"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
131 "'" "~i" ",l" "'<" "'," "s<" "e-" ",g" "/t" "NG"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
132 "z<" "ng" "A-" "A'" "A^" "~A" "\"A" "Ao" "AE" "I;"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
133 "C<" "E'" "E;" "\"E" "E^." "I'" "I^" "I-" "/D" ",N"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
134 "O-" ",K" "O^" "~O" "\"O" "*x" "/O" "U;" "U'" "U^"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
135 "\"U" "~U" "U-" "ss" "a-" "a'" "a^" "~a" "\"a" "ao"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
136 "ae" "i;" "c<" "e'" "e;" "\"e" "e^." "i'" "i^" "i-"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
137 "/d" ",n" "o-" ",k" "o^" "~o" "\"o" "-:" "/o" "u;"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
138 "u'" "u^" "\"u" "~u" "u-" "^."]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
139 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
140 (cyrillic-iso8859-5
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
141 . [255 "\"E" "Dj" "Gj" "IE" "Dz" "Ii" "Ji" "JE" "Lj"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
142 "Nj" "Ts" "Kj" 240 "V%" "Dzh" 65 "B=" 66 226
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
143 68 69 "Z%" 51 85 "J=" 75 "L=" 77 72
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
144 79 "P=" 80 67 84 89 232 88 "C=" "C%"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
145 "S%" "Sc" "=\"" "Y=" "%\"" "Ee" "Yu" "Ya" 97 98
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
146 "v=" "g=" 103 101 "z%" "z=" 117 "j=" 107 "l="
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
147 "m=" "n=" 111 110 112 99 "t=" 121 "f=" 120
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
148 "c=" "c%" "s%" "sc" "='" "y=" "%'" "ee" "yu" "ya"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
149 "N0" "\"e" "dj" "gj" "ie" "dz" "ii" "ji" "je" "lj"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
150 "nj" "ts" "kj" 21 "v%" "dzh"]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
151 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
152 (arabic-iso8859-6
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
153 . [255 nil nil nil "$$" nil nil nil nil nil
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
154 nil nil ",+" "--" nil nil nil nil nil nil
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
155 nil nil nil nil nil nil nil ";+" nil nil
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
156 nil "?+" nil "H'" "aM" "aH" "wH" "ah" "yH"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
157 "a+" "b+" "tm" "t+" "tk" "g+" "hk" "x+" "d+" "dk"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
158 "r+" "z+" "s+" "sn" "c+" "dd" "tj" "zH" "e+" "i+"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
159 nil nil nil nil nil "++" "f+" "q+" "k+" "l+"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
160 "m+" "n+" "h+" "w+" "j+" "y+" ":+" "\"+" "=+" "/+"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
161 "'+" "1+" "3+" "0+" nil nil nil nil nil nil
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
162 nil nil nil nil nil nil nil]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
163 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
164 (greek-iso8859-7
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
165 . [255 "9'" "'9" "Pd" nil nil "|" "SE" "\"" "(c)"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
166 nil "<<" "~" "--" nil "-M" "^o" "+-" "^2" "^3"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
167 "'" "'%" "A%" "^." "E%" "Y%" "I%" ">>" "O%" "1/2"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
168 "U%" "W%" "i3" "A*" "B*" "G*" "D*" "E*" "Z*" "Y*"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
169 "H*" "I*" "K*" "L*" "M*" "N*" "C*" "O*" "P*" "R*"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
170 nil "S*" "T*" "U*" "F*" "X*" "Q*" "W*" "J*" "V*"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
171 "a%" "e%" "y%" "i%" "u3" "a*" "b*" "g*" "d*" "e*"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
172 "z*" "y*" "h*" "i*" "k*" "l*" "m*" "n*" "c*" "o*"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
173 "p*" "r*" "*s" "s*" "t*" "u*" "f*" "x*" "q*" "w*"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
174 "j*" "v*" "o%" "u%" "w%" nil]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
175 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
176 (hebrew-iso8859-8
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
177 . [255 nil "|c" "Pd" "$$" "Ye" "|" "SE" "\"" "(c)"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
178 "*x" "<<" "~" "--" "(R)" "'-" "^o" "+-" "^2" "^3"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
179 "'" "u" ".P" "^." "'," "^1" "-:" ">>" "1/4" "1/2"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
180 "3/4" nil nil nil nil nil nil nil nil nil
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
181 nil nil nil nil nil nil nil nil nil nil
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
182 nil nil nil nil nil nil nil nil nil nil
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
183 nil nil nil "=2" "A+" "B+" "G+" "D+" "H+" "W+"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
184 "Z+" "X+" "Tj" "J+" "K%" "K+" "L+" "M%" "M+" "N%"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
185 "N+" "S+" "E+" "P%" "P+" "Zj" "ZJ" "Q+" "R+" "Sh"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
186 "T+" nil nil nil nil nil]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
187 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
188 (latin-iso8859-9
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
189 . [255 "!I" "|c" "Pd" "$$" "Ye" "|" "SE" "\"" "(c)"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
190 "_a" "<<" "~" "--" "(R)" "'-" "^o" "+-" "^2" "^3"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
191 "'" "u" ".P" "^." "'," "^1" "_o" ">>" "1/4" "1/2"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
192 "3/4" "?I" "`A" "A'" "A^" "~A" "\"A" "Ao" "AE" ",C"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
193 "`E" "E'" "E^" "\"E" "`I" "I'" "I^" "\"I" "G(" "~N"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
194 "`O" "O'" "O^" "~O" "\"O" "*x" "/O" "`U" "U'" "U^"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
195 "\"U" "I^." ",S" "ss" "`a" "a'" "a^" "~a" "\"a" "ao"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
196 "ae" ",c" "`e" "e'" "e^" "\"e" "e^." "i'" "i^" "i-"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
197 "g(" "~n" "`o" "o'" "o^" "~o" "\"o" "-:" "/o" "`u"
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
198 "u'" "u^" "\"u" "i^." ",s" "\"y"]
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
199 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
200 )
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
201 "An alist of MULE ISO-8859 character sets and the strings that
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
202 should be used to represent the characters from each set on a DOS
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
203 terminal which does not have corresponding glyphs built into the
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
204 installed codepage.")
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
205
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
206 (defun IT-display-table-setup (codepage &optional table)
24845
87e4cdfac07b (IT-display-table-setup): Do not remap \222 to
Eli Zaretskii <eliz@gnu.org>
parents: 24563
diff changeset
207 "Set up display table TABLE for a DOS terminal which supports
87e4cdfac07b (IT-display-table-setup): Do not remap \222 to
Eli Zaretskii <eliz@gnu.org>
parents: 24563
diff changeset
208 glyphs built into the codepage CODEPAGE.
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
209
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
210 If TABLE is nil or omitted, `standard-display-table' is used."
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
211 (let* ((surrogates IT-character-translations)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
212 (disp-tab (or table standard-display-table))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
213 (built-in-set (cp-charset-for-codepage codepage))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
214 (offset (cp-offset-for-codepage codepage))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
215 (cp-decoder
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
216 (symbol-value (intern-soft (format "%s-decode-table" codepage))))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
217 (cp-decoder-len (length cp-decoder))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
218 (c offset)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
219 association chset)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
220 ;; Undo the effects of previous call (where they may have used
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
221 ;; a different codepage) by reverting the display table for the
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
222 ;; built-in charset to its pristine shape.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
223 (while (< c (+ offset 128))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
224 (aset disp-tab (make-char built-in-set c) nil)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
225 (setq c (1+ c)))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
226 (while surrogates
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
227 (setq association (car surrogates))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
228 (setq chset (car association))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
229 (let* ((vector (cdr association))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
230 (veclen (length vector))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
231 (i 0)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
232 glyph)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
233 (while (< i veclen)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
234 (setq glyph (aref vector i))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
235 (if (and glyph
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
236 (or (not (equal chset built-in-set))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
237 (>= i cp-decoder-len)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
238 (null (aref cp-decoder i))))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
239 (aset disp-tab (make-char chset (+ i (logand offset 127)))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
240 (vconcat
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
241 (if (numberp glyph)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
242 (char-to-string glyph)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
243 (if (> (length glyph) 1) (concat "{" glyph "}")
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
244 glyph)))))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
245 (setq i (1+ i))))
24845
87e4cdfac07b (IT-display-table-setup): Do not remap \222 to
Eli Zaretskii <eliz@gnu.org>
parents: 24563
diff changeset
246 (setq surrogates (cdr surrogates)))))
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
247
24563
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
248 (defun dos-cpNNN-setup (codepage)
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
249 "Set up the MULE environment using the DOS codepage CODEPAGE.
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
250
24563
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
251 This function creates the coding system cpNNN (where NNN is the value
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
252 of the argument CODEPAGE), and then uses this coding system to set up
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
253 display tables, and the language environment options as appropriate."
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
254 (let* ((cp (format "cp%s" codepage))
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
255 (charset (cp-charset-for-codepage cp))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
256 (offset (cp-offset-for-codepage cp)))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
257 (cp-make-coding-systems-for-codepage cp charset offset)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
258 ;; This is done by set-language-environment.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
259 ;;(setq nonascii-translation-table
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
260 ;; (symbol-value (intern (concat cp "-nonascii-translation-table"))))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
261 (set-language-environment (cp-language-for-codepage cp))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
262 (set-default-coding-systems (intern (concat cp "-dos")))
24261
3183582345f0 (dos-codepage-setup): Set selection coding system to cpNNN-dos.
Eli Zaretskii <eliz@gnu.org>
parents: 24162
diff changeset
263 (set-selection-coding-system (intern (concat cp "-dos")))
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
264 (set-terminal-coding-system
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
265 (setq default-terminal-coding-system (intern (concat cp
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
266 "-unix"))))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
267 (IT-display-table-setup cp)
24162
93161ca8b2e5 (dos-codepage-setup): Call prefer-coding-system
Eli Zaretskii <eliz@gnu.org>
parents: 23918
diff changeset
268 (prefer-coding-system (intern (concat cp "-dos")))
24490
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
269 (if default-enable-multibyte-characters
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
270 ;; We want this in multibyte version only, since unibyte version
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
271 ;; should not convert non-ASCII characters at all.
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
272 (setq unibyte-display-via-language-environment t)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
273 ;; Let the unibyte version behave as Emacs 19 did. In particular,
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
274 ;; let it use and display native codepage-specific glyphs for
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
275 ;; non-ASCII characters. For this to work correctly, we need to
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
276 ;; establish the correspondence between lower-case letters and their
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
277 ;; upper-case brethren, as appropriate for the codepage in use. The
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
278 ;; code below makes this happen.
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
279 ;; (In the multibyte mode, the appropriate tables are prepared
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
280 ;; elsewhere, since multibyte Emacs uses normal MULE character sets,
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
281 ;; which are supported on all platforms.)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
282 (let* ((i 128)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
283 (modify (function
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
284 (lambda (ch sy)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
285 (modify-syntax-entry ch sy text-mode-syntax-table)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
286 (if (boundp 'tex-mode-syntax-table)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
287 (modify-syntax-entry ch sy tex-mode-syntax-table))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
288 (modify-syntax-entry ch sy (standard-syntax-table))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
289 )))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
290 (table (standard-case-table))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
291 ;; The following are strings of letters, first lower then
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
292 ;; upper case. This will look funny on terminals which
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
293 ;; display other code pages. In particular, what is
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
294 ;; displayed as blanks or triangles are not what they
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
295 ;; look lile at all! (Use `C-x =' to see what they
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
296 ;; really are.)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
297 (chars
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
298 (cond
24563
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
299 ((= codepage 850)
24490
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
300 "‡€š‚ƒķ„Ž…·†ÆĮ ĩˆŌ‰ÓŠÔ‹ØŒŨÞĄÖ‘’“â”™•ãĒā›–ęĢé—ë˜YėíĄIĢéĪĨÐŅįč")
24563
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
301 ((= codepage 865)
24490
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
302 "‡€š‚ƒA„Ž…A†ˆE‰EŠE‹IŒII‘’“O”™•O–UĢU˜Y› AĄIĒOĢUĪĨ")
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
303 ;; default is 437
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
304 (t "‡€š‚ƒA„Ž…A†ˆE‰EŠE‹IŒII‘’“O”™•O–UĢU˜Y AĄIĒOĢUĪĨ"))))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
305
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
306 (while (< i 256)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
307 (funcall modify i "_")
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
308 (setq i (1+ i)))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
309
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
310 (setq i 0)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
311 (while (< i (length chars))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
312 (let ((ch1 (aref chars i))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
313 (ch2 (aref chars (1+ i))))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
314 (if (> ch2 127)
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
315 (set-case-syntax-pair ch2 ch1 table))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
316 (setq i (+ i 2))))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
317 (save-excursion
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
318 (mapcar (lambda (b) (set-buffer b) (set-case-table table))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
319 (buffer-list)))
7a5f7af21c27 (dos-codepage-setup): Compute the unibyte
Eli Zaretskii <eliz@gnu.org>
parents: 24448
diff changeset
320 (set-standard-case-table table)))
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
321 ;; Some codepages have sporadic support for Latin-1, Greek, and
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
322 ;; symbol glyphs, which don't belong to their native character
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
323 ;; set. It's a nuisance to have all those glyphs here, for all
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
324 ;; the codepages (for starters, I don't even have references for
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
325 ;; all the codepages). So I provide a hook for those who want to
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
326 ;; squeeze every bit of support out of their terminal/font.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
327 (run-hooks 'dos-codepage-setup-hook)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
328 ))
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
329
24563
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
330 ;; FIXME: Korean and Chinese codepages should be added here, but I
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
331 ;; don't know what coding systems do they support. The codepages in
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
332 ;; point are 934, 936, 938, 944, and 948.
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
333 (defvar cjk-codepages-alist
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
334 '((932 "Japanese" japanese-shift-jis))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
335 "An alist of Far-Eastern codepages and the names of the associated
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
336 language and supported coding system.")
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
337
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
338 (defun dos-codepage-setup ()
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
339 "Set up the MULE environment as appropriate for the installed DOS codepage.
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
340
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
341 This function sets coding systems, display tables, and the language
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
342 environment options as appropriate for the current value of `dos-codepage'.
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
343
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
344 This function is automatically run at startup via the `term-setup-hook'
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
345 list. You can (and should) also run it whenever the value of
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
346 `dos-codepage' changes."
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
347 (interactive)
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
348 (let* ((desc (cdr (assq dos-codepage cjk-codepages-alist)))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
349 (lang (car desc))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
350 (coding (car (cdr desc)))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
351 coding-dos coding-unix)
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
352 (if (null desc)
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
353 (dos-cpNNN-setup dos-codepage)
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
354 ;; We've got one of the Far-Eastern codepages which support
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
355 ;; MULE native coding systems directly.
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
356 (setq coding-dos (intern (format "%s-dos" coding))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
357 coding-unix (intern (format "%s-unix" coding)))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
358 (set-language-environment (car desc))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
359 (set-selection-coding-system coding-dos)
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
360 (setq file-name-coding-system coding-unix)
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
361 (set-terminal-coding-system
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
362 (setq default-terminal-coding-system coding-unix))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
363 ;; Assume they support non-ASCII Latin characters like the IBM
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
364 ;; codepage 437 does.
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
365 (IT-display-table-setup "cp437")
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
366 (prefer-coding-system coding-dos)
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
367 (if default-enable-multibyte-characters
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
368 (setq unibyte-display-via-language-environment t))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
369 )))
c2f09365ec12 (dos-cpNNN-setup): New function, with the guts
Eli Zaretskii <eliz@gnu.org>
parents: 24490
diff changeset
370
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
371 ;; We want to delay the terminal and other codepage-related setup
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
372 ;; until after the terminal is set and user's .emacs is processed,
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
373 ;; because people might define their `dos-codepage-setup-hook' there.
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
374 (add-hook 'term-setup-hook 'dos-codepage-setup)
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
375
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
376 ;; In multibyte mode, we want unibyte buffers to be displayed using
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
377 ;; the terminal coding system, so that they display correctly on the
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
378 ;; DOS terminal; in unibyte mode we want to see all 8-bit characters
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
379 ;; verbatim. In both cases, we want the entire range of 8-bit
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
380 ;; characters to arrive at our display code verbatim.
24448
54fa245dc776 (top level): Display character 255 as 8bit as well.
Eli Zaretskii <eliz@gnu.org>
parents: 24261
diff changeset
381 (standard-display-8bit 127 255)
23918
73c3dcc21ced (IT-character-translations): New variable, an
Eli Zaretskii <eliz@gnu.org>
parents: 23811
diff changeset
382
17517
8f952e921136 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 14170
diff changeset
383 ;;; internal.el ends here
8f952e921136 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 14170
diff changeset
384