annotate lisp/international/latin1-disp.el @ 33335:3fcf9bc886b8

(tool-bar-map): Defvar when compiling.
author Dave Love <fx@gnu.org>
date Thu, 09 Nov 2000 11:46:48 +0000
parents 00c403ac9e5e
children d85712cf7ea3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31673
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
1 ;;; latin1-disp.el --- display tables for other ISO 8859 on Latin-1 terminals -*- coding: emacs-mule -*-
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
2
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
3 ;; Copyright (C) 2000 Free Software Foundation, Inc.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
4
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
5 ;; Author: Dave Love <fx@gnu.org>
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
6 ;; Keywords: i18n
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
7
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
9
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
13 ;; any later version.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
14
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
19
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
23 ;; Boston, MA 02111-1307, USA.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
24
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
26
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
27 ;; This package sets up display of ISO 8859-n for n>1 by substituting
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
28 ;; Latin-1 characters and sequences of them for characters which can't
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
29 ;; be displayed, either beacuse we're on a tty or beacuse we don't
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
30 ;; have the relevant window system fonts available. For instance,
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
31 ;; Latin-9 is very similar to Latin-1, so we can display most Latin-9
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
32 ;; characters using the Latin-1 characters at the same code point and
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
33 ;; fall back on more-or-less mnemonic ASCII sequences for the rest.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
34
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
35 ;; For the Latin charsets the ASCII sequences are mostly consistent
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
36 ;; with the Quail prefix input sequences. Latin-4 uses the Quail
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
37 ;; postfix sequences as a prefix method isn't defined for Latin-4.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
38
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
39 ;; A different approach is taken in the DOS display tables in
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
40 ;; term/internal.el, and the relevant ASCII sequences from there are
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
41 ;; available as an alternative; see `latin1-display-mnemonic'. Only
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
42 ;; these sequences are used for Cyrillic, Greek and Hebrew.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
43
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
44 ;; If you don't even have Latin-1, see iso-ascii.el and use the
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
45 ;; complete tables from internal.el. The ASCII sequences used here
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
46 ;; are mostly in the same style as iso-ascii.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
47
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
48 ;;; Code:
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
49
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
50 (defconst latin1-display-sets '(latin-2 latin-3 latin-4 latin-5 latin-8
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
51 latin-9 cyrillic greek hebrew)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
52 "The ISO8859 character sets with defined Latin-1 display sequences.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
53 These are the nicknames for the sets and correspond to Emacs language
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
54 environments.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
55
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
56 (defgroup latin1-display ()
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
57 "Set up display tables for ISO8859 characters using Latin-1."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
58 :version "21.1"
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
59 :group 'i18n)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
60
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
61 (defcustom latin1-display-format "{%s}"
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
62 "A format string used to display the ASCII sequences.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
63 The default encloses the sequence in braces, but you could just use
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
64 \"%s\" to avoid the braces."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
65 :group 'latin1-display
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
66 :type 'string)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
67
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
68 ;;;###autoload
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
69 (defcustom latin1-display nil
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
70 "Set up Latin-1/ASCII display for ISO8859 character sets.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
71 This is done for each character set in the list `latin1-display-sets',
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
72 if no font is available to display it. Characters are displayed using
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
73 the corresponding Latin-1 characters where they match. Otherwise
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
74 ASCII sequences are used, mostly following the Latin prefix input
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
75 methods. Some different ASCII sequences are used if
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
76 `latin1-display-mnemonic' is non-nil.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
77
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
78 Setting this variable directly does not take effect;
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
79 use either M-x customize of the function `latin1-display'."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
80 :group 'latin1-display
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
81 :type 'boolean
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
82 :require 'latin1-disp
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
83 :initialize 'custom-initialize-default
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
84 :set (lambda (symbol value)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
85 (if value
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
86 (mapc (if value
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
87 #'latin1-display-setup
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
88 #'latin1-display-reset)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
89 latin1-display-sets))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
90
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
91 ;;;###autoload
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
92 (defun latin1-display (&rest sets)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
93 "Set up Latin-1/ASCII display for the arguments character SETS.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
94 See option `latin1-display' for the method. The members of the list
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
95 must be in `latin1-display-sets'. With no arguments, reset the
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
96 display for all of `latin1-display-sets'. See also `latin1-display-setup'."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
97 (if sets
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
98 (mapc #'latin1-display-setup sets)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
99 (mapc #'latin1-display-reset latin1-display-sets)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
100
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
101 (defcustom latin1-display-mnemonic nil
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
102 "Non-nil means to display potentially more mnemonic sequences.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
103 These are taken from the tables in `internal.el' rather than the Quail
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
104 input sequences."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
105 :type 'boolean
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
106 :group 'latin1-display)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
107
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
108 (defun latin1-display-char (char display &optional alt-display)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
109 "Make an entry in `standard-display-table' for CHAR using string DISPLAY.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
110 If ALT-DISPLAY is provided, use that instead if
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
111 `latin1-display-mnemonic' is non-nil. The actual string displayed is
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
112 formatted using `latin1-display-format'."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
113 (if (and (stringp alt-display)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
114 latin1-display-mnemonic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
115 (setq display alt-display))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
116 (if (stringp display)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
117 (standard-display-ascii char (format latin1-display-format display))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
118 (aset standard-display-table char display)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
119
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
120 (defun latin1-display-identities (charset)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
121 "Display each character in CHARSET as the corresponding Latin-1 character.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
122 CHARSET is a symbol naming a language environment using an ISO8859
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
123 character set."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
124 (if (eq charset 'cyrillic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
125 (setq charset 'cyrillic-iso))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
126 (let ((i 32)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
127 (set (car (remq 'ascii (get-language-info charset 'charset)))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
128 (while (<= i 127)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
129 (aset standard-display-table
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
130 (make-char set i)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
131 (vector (make-char 'latin-iso8859-1 i)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
132 (setq i (1+ i)))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
133
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
134 (defun latin1-display-reset (language)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
135 "Set up the default display for each character of LANGUAGE's charset.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
136 CHARSET is a symbol naming a language environment using an ISO8859
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
137 character set."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
138 (if (eq language 'cyrillic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
139 (setq language 'cyrillic-iso))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
140 (let ((charset (car (remq 'ascii (get-language-info language
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
141 'charset)))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
142 (standard-display-default (make-char charset 32)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
143 (make-char charset 127)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
144 (sit-for 0))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
145
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
146 (defun latin1-display-check-font (language)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
147 "Return non-nil if we have a font with an encoding for LANGUAGE.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
148 LANGUAGE is a symbol naming a language environment using an ISO8859
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
149 character set: `latin-2', `hebrew' etc."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
150 (if (eq language 'cyrillic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
151 (setq language 'cyrillic-iso))
32785
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
152 (let* ((info (get-language-info language 'charset))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
153 (char (make-char (car (remq 'ascii info)) ?\ )))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
154 (latin1-char-displayable-p char)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
155
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
156 ;; This should be moved into mule-utils or somewhere after 21.1.
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
157 (defun latin1-char-displayable-p (char)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
158 (cond ((< char 256)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
159 ;; Single byte characters are always displayable.
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
160 t)
32997
00c403ac9e5e (latin1-char-displayable-p): Don't
Dave Love <fx@gnu.org>
parents: 32785
diff changeset
161 ((display-multi-font-p)
32785
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
162 ;; On a window system, a character is displayable if we have
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
163 ;; a font for that character in the default face of the
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
164 ;; currently selected frame.
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
165 (let ((fontset (frame-parameter (selected-frame) 'font))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
166 font-pattern)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
167 (if (query-fontset fontset)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
168 (setq font-pattern (fontset-font fontset char)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
169 (or font-pattern
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
170 (setq font-pattern (fontset-font "fontset-default" char)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
171 (if font-pattern
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
172 (progn
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
173 ;; Now FONT-PATTERN is a string or a cons of family
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
174 ;; field pattern and registry filed pattern.
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
175 (or (stringp font-pattern)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
176 (setq font-pattern (concat (or (car font-pattern) "*")
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
177 "-*-"
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
178 (cdr font-pattern))))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
179 (x-list-fonts font-pattern 'default (selected-frame) 1)))))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
180 (t
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
181 (let ((coding (terminal-coding-system)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
182 (if coding
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
183 (let ((safe-chars (coding-system-get coding 'safe-chars))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
184 (safe-charsets (coding-system-get coding 'safe-charsets)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
185 (or (and safe-chars
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
186 (aref safe-chars char))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
187 (and safe-charsets
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
188 (memq (char-charset char) safe-charsets)))))))))
31673
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
189
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
190 (defun latin1-display-setup (set &optional force)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
191 "Set up Latin-1 display for characters in the given SET.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
192 SET must be a member of `latin1-display-sets'. Normally, check
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
193 whether a font for SET is available and don't set the display if it
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
194 is. If FORCE is non-nil, set up the display regardless."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
195 (cond
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
196 ((eq set 'latin-2)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
197 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
198 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
199 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
200 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
201 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
202 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
203 '((? "'C" "C'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
204 (? "'D" "/D")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
205 (? "'S" "S'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
206 (? "'c" "c'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
207 (? "'d" "/d")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
208 (? "'L" "L'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
209 (? "'n" "n'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
210 (? "'N" "N'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
211 (? "'r" "r'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
212 (? "'R" "R'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
213 (? "'s" "s'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
214 (? "'z" "z'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
215 (? "'Z" "Z'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
216 (? "`A" "A;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
217 (? "`E" "E;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
218 (? "`L" "/L")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
219 (? "`S" ",S")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
220 (? "`T" ",T")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
221 (? "`Z" "Z^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
222 (? "`a" "a;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
223 (? "`l" "/l")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
224 (? "`e" "e;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
225 (? "`s" ",s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
226 (? "`t" ",t")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
227 (? "`z" "z^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
228 (? "`." "'.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
229 (? "~A" "A(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
230 (? "~C" "C<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
231 (? "~D" "D<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
232 (? "~E" "E<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
233 (? "~e" "e<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
234 (? "~L" "L<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
235 (? "~N" "N<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
236 (? "~O" "O''")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
237 (? "~R" "R<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
238 (? "~S" "S<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
239 (? "~T" "T<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
240 (? "~U" "U''")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
241 (? "~Z" "Z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
242 (? "~a" "a(}")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
243 (? "~c" "c<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
244 (? "~d" "d<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
245 (? "~l" "l<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
246 (? "~n" "n<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
247 (? "~o" "o''")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
248 (? "~r" "r<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
249 (? "~s" "s<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
250 (? "~t" "t<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
251 (? "~u" "u''")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
252 (? "~z" "z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
253 (? "~v" "'<") ; ? in latin-pre
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
254 (? "~~" "'(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
255 (? "uu" "u^0")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
256 (? "UU" "U^0")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
257 (? "\"A")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
258 (? "\"a")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
259 (? "\"E" "E:")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
260 (? "\"e")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
261 (? "''" "'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
262 (? "'<") ; Lynx's rendering of caron
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
263 ))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
264
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
265 ((eq set 'latin-3)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
266 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
267 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
268 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
269 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
270 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
271 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
272 '((? "/H")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
273 (? "~`" "'(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
274 (? "^H" "H^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
275 (? "^h" "h^") (? ".I" "I^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
276 (? ",S")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
277 (? "~G" "G(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
278 (? "^J" "J^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
279 (? ".Z" "Z^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
280 (? "/h")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
281 (? ".i" "i^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
282 (? ",s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
283 (? "~g" "g(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
284 (? "^j" "j^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
285 (? ".Z" "z^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
286 (? ".c" "C^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
287 (? "^C" "C^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
288 (? ".G" "G^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
289 (? "^G" "G^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
290 (? "~U" "U(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
291 (? "^S" "S^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
292 (? ".C" "c^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
293 (? "^c" "c^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
294 (? ".g" "g^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
295 (? "^g" "g^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
296 (? "~u" "u(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
297 (? "^s" "s^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
298 (? "/." "^.")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
299
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
300 ((eq set 'latin-4)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
301 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
302 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
303 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
304 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
305 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
306 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
307 '((? "A," "A;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
308 (? "k/" "kk")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
309 (? "R," ",R")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
310 (? "I~" "?I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
311 (? "L," ",L")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
312 (? "S~" "S<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
313 (? "E-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
314 (? "G," ",G")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
315 (? "T/" "/T")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
316 (? "Z~" "Z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
317 (? "a," "a;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
318 (? "';")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
319 (? "r," ",r")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
320 (? "i~" "~i")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
321 (? "l," ",l")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
322 (? "'<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
323 (? "s~" "s<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
324 (? "e-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
325 (? "g," ",g")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
326 (? "t/" "/t")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
327 (? "N/" "NG")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
328 (? "z~" "z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
329 (? "n/" "ng")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
330 (? "A-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
331 (? "I," "I;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
332 (? "C~" "C<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
333 (? "E," "E;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
334 (? "E." "E^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
335 (? "I-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
336 (? "N," ",N")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
337 (? "O-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
338 (? "K," ",K")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
339 (? "U," "U;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
340 (? "U~" "~U")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
341 (? "U-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
342 (? "a-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
343 (? "i," "i;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
344 (? "c~" "c<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
345 (? "e," "e;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
346 (? "e." "e^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
347 (? "i-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
348 (? "d/" "/d")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
349 (? "n," ",n")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
350 (? "o-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
351 (? "k," ",k")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
352 (? "u," "u;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
353 (? "u~" "~u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
354 (? "u-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
355 (? "^.")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
356
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
357 ((eq set 'latin-5)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
358 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
359 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
360 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
361 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
362 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
363 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
364 '((? "~g" "g(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
365 (? "~G" "G(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
366 (? ".I" "I^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
367 (? ",s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
368 (? ",S")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
369 (? "^e" "e<") ; from latin-post
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
370 (? ".e" "e^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
371 (? "\"i" "i-") ; from latin-post
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
372 (? ".i" "i.")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
373
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
374 ((eq set 'latin-8)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
375 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
376 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
377 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
378 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
379 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
380 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
381 '((? ".B" "B`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
382 (? ".b" "b`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
383 (? ".c" "c`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
384 (? ".C" "C`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
385 (? ".D" "D`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
386 (? ".d" "d`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
387 (? "`w")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
388 (? "`W")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
389 (? "'w" "w'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
390 (? "'W" "W'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
391 (? "`y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
392 (? "`Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
393 (? ".f" "f`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
394 (? ".F" "F`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
395 (? ".g" "g`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
396 (? ".G" "G`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
397 (? ".m" "m`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
398 (? ".M" "M`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
399 (? ".p" "p`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
400 (? ".P" "P`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
401 (? ".s" "s`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
402 (? ".S" "S`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
403 (? "\"w")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
404 (? "\"W")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
405 (? "^w" "w^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
406 (? "^W" "W^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
407 (? ".t" "t`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
408 (? ".T" "T`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
409 (? "^y" "y^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
410 (? "^Y" "Y^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
411 (? "\"Y")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
412
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
413 ((eq set 'latin-9)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
414 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
415 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
416 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
417 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
418 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
419 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
420 '((? "~s" "s<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
421 (? "~S" "S<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
422 (? "Euro" "E=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
423 (? "~z" "z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
424 (? "~Z" "Z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
425 (? "\"Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
426 (? "oe")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
427 (? "OE")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
428
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
429 ((eq set 'greek)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
430 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
431 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
432 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
433 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
434 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
435 '((? "9'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
436 (? "'9")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
437 (? "-M")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
438 (? "'%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
439 (? "'A")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
440 (? "'E")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
441 (? "'H")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
442 (? "'I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
443 (? "'O")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
444 (? "'Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
445 (? "W%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
446 (? "i3")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
447 (? "G*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
448 (? "D*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
449 (? "TH")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
450 (? "L*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
451 (? "C*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
452 (? "P*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
453 (? "S*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
454 (? "F*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
455 (? "Q*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
456 (? "W*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
457 (? "\"I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
458 (? "\"Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
459 (? "a%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
460 (? "e%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
461 (? "y%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
462 (? "i%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
463 (? "u3")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
464 (? "a*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
465 (? "b*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
466 (? "g*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
467 (? "d*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
468 (? "e*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
469 (? "z*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
470 (? "y*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
471 (? "h*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
472 (? "i*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
473 (? "k")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
474 (? "l*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
475 (? "m*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
476 (? "n*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
477 (? "c*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
478 (? "p*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
479 (? "r*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
480 (? "*s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
481 (? "s*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
482 (? "t*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
483 (? "u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
484 (? "f*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
485 (? "x*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
486 (? "q*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
487 (? "w*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
488 (? "\"i")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
489 (? "\"u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
490 (? "'o")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
491 (? "'u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
492 (? "'w")))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
493 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
494 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
495 (aset standard-display-table (car l) (string-to-vector (cadr l))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
496 '((? "A")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
497 (? "B")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
498 (? "E")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
499 (? "Z")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
500 (? "H")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
501 (? "I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
502 (? "J")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
503 (? "M")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
504 (? "N")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
505 (? "O")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
506 (? "P")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
507 (? "T")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
508 (? "Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
509 (? "X")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
510 (? "o")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
511
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
512 ((eq set 'hebrew)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
513 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
514 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
515 ;; Don't start with identities, since we don't have definitions
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
516 ;; for a lot of Hebrew in internal.el. (Intlfonts is also
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
517 ;; missing some glyphs.)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
518 (let ((i 34))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
519 (while (<= i 62)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
520 (aset standard-display-table
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
521 (make-char 'hebrew-iso8859-8 i)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
522 (vector (make-char 'latin-iso8859-1 i)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
523 (setq i (1+ i))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
524 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
525 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
526 (aset standard-display-table (car l) (string-to-vector (cadr l))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
527 '((? "=2")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
528 (? "A+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
529 (? "B+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
530 (? "G+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
531 (? "D+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
532 (? "H+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
533 (? "W+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
534 (? "Z+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
535 (? "X+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
536 (? "Tj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
537 (? "J+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
538 (? "K%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
539 (? "K+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
540 (? "L+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
541 (? "M%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
542 (? "M+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
543 (? "N%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
544 (? "N+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
545 (? "S+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
546 (? "E+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
547 (? "P%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
548 (? "P+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
549 (? "Zj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
550 (? "ZJ")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
551 (? "Q+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
552 (? "R+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
553 (? "Sh")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
554 (? "T+")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
555
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
556 ((eq set 'cyrillic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
557 (setq set 'cyrillic-iso)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
558 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
559 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
560 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
561 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
562 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
563 '((? "Dj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
564 (? "Gj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
565 (? "IE")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
566 (? "Lj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
567 (? "Nj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
568 (? "Ts")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
569 (? "Kj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
570 (? "V%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
571 (? "Dzh")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
572 (? "B=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
573 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
574 (? "D")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
575 (? "Z%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
576 (? "3")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
577 (? "U")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
578 (? "J=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
579 (? "L=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
580 (? "P=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
581 (? "Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
582 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
583 (? "C=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
584 (? "C%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
585 (? "S%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
586 (? "Sc")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
587 (? "=\"")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
588 (? "Y=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
589 (? "%\"")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
590 (? "Ee")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
591 (? "Yu")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
592 (? "Ya")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
593 (? "b")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
594 (? "v=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
595 (? "g=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
596 (? "g")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
597 (? "z%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
598 (? "z=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
599 (? "u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
600 (? "j=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
601 (? "k")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
602 (? "l=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
603 (? "m=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
604 (? "n=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
605 (? "n")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
606 (? "p")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
607 (? "t=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
608 (? "f=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
609 (? "c=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
610 (? "c%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
611 (? "s%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
612 (? "sc")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
613 (? "='")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
614 (? "y=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
615 (? "%'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
616 (? "ee")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
617 (? "yu")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
618 (? "ya")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
619 (? "N0")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
620 (? "dj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
621 (? "gj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
622 (? "ie")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
623 (? "lj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
624 (? "nj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
625 (? "ts")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
626 (? "kj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
627 (? "v%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
628 (? "dzh")))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
629 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
630 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
631 (aset standard-display-table (car l) (string-to-vector (cadr l))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
632 '((? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
633 (? "S")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
634 (? "I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
635 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
636 (? "J")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
637 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
638 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
639 (? "-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
640 (? "A")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
641 (? "B")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
642 (? "E")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
643 (? "K")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
644 (? "M")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
645 (? "H")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
646 (? "O")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
647 (? "P")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
648 (? "C")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
649 (? "T")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
650 (? "X")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
651 (? "a")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
652 (? "e")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
653 (? "o")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
654 (? "c")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
655 (? "y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
656 (? "x")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
657 (? "s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
658 (? "i")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
659 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
660 (? "j")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
661
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
662 (t (error "Unsupported character set: %S" set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
663
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
664 (sit-for 0))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
665
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
666 (provide 'latin1-disp)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
667
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
668 ;;; latin1-disp.el ends here