root/trunk/lisp/international/latin1-disp.el

Revision 4220, 81.5 kB (checked in by miyoshi, 9 months ago)

Sync up with Emacs22.2.

  • Property svn:eol-style set to LF
Line 
1 ;;; latin1-disp.el --- display tables for other ISO 8859 on Latin-1 terminals -*-coding: iso-2022-7bit;-*-
2
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4 ;;   Free Software Foundation, Inc.
5
6 ;; Author: Dave Love <fx@gnu.org>
7 ;; Keywords: i18n
8
9 ;; This file is part of GNU Emacs.
10
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 3, or (at your option)
14 ;; any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02110-1301, USA.
25
26 ;;; Commentary:
27
28 ;; This package sets up display of ISO 8859-n for n>1 by substituting
29 ;; Latin-1 characters and sequences of them for characters which can't
30 ;; be displayed, either because we're on a tty or because we don't
31 ;; have the relevant window system fonts available.  For instance,
32 ;; Latin-9 is very similar to Latin-1, so we can display most Latin-9
33 ;; characters using the Latin-1 characters at the same code point and
34 ;; fall back on more-or-less mnemonic ASCII sequences for the rest.
35
36 ;; For the Latin charsets the ASCII sequences are mostly consistent
37 ;; with the Quail prefix input sequences.  Latin-4 uses the Quail
38 ;; postfix sequences since a prefix method isn't defined for Latin-4.
39
40 ;; [A different approach is taken in the DOS display tables in
41 ;; term/internal.el, and the relevant ASCII sequences from there are
42 ;; available as an alternative; see `latin1-display-mnemonic'.  Only
43 ;; these sequences are used for Arabic, Cyrillic, Greek and Hebrew.]
44
45 ;; If you don't even have Latin-1, see iso-ascii.el and use the
46 ;; complete tables from internal.el.  The ASCII sequences used here
47 ;; are mostly in the same style as iso-ascii.
48
49 ;;; Code:
50
51 ;; Ensure `standard-display-table' is set up:
52 (require 'disp-table)
53
54 (defconst latin1-display-sets '(latin-2 latin-3 latin-4 latin-5 latin-8
55                                 latin-9 arabic cyrillic greek hebrew)
56   "The ISO8859 character sets with defined Latin-1 display sequences.
57 These are the nicknames for the sets and correspond to Emacs language
58 environments.")
59
60 (defgroup latin1-display ()
61   "Set up display tables for ISO8859 characters using Latin-1."
62   :version "21.1"
63   :link '(emacs-commentary-link "latin1-disp")
64   :group 'i18n)
65
66 (defcustom latin1-display-format "{%s}"
67   "A format string used to display the ASCII sequences.
68 The default encloses the sequence in braces, but you could just use
69 \"%s\" to avoid the braces, maybe with a non-default value of
70 `latin1-display-face'."
71   :group 'latin1-display
72   :type 'string)
73
74 ;;;###autoload
75 (defcustom latin1-display nil
76   "Set up Latin-1/ASCII display for ISO8859 character sets.
77 This is done for each character set in the list `latin1-display-sets',
78 if no font is available to display it.  Characters are displayed using
79 the corresponding Latin-1 characters where they match.  Otherwise
80 ASCII sequences are used, mostly following the Latin prefix input
81 methods.  Some different ASCII sequences are used if
82 `latin1-display-mnemonic' is non-nil.
83
84 This option also treats some characters in the `mule-unicode-...'
85 charsets if you don't have a Unicode font with which to display them.
86
87 Setting this variable directly does not take effect;
88 use either \\[customize] or the function `latin1-display'."
89   :group 'latin1-display
90   :type 'boolean
91   :require 'latin1-disp
92   :initialize 'custom-initialize-default
93   :set (lambda (symbol value)
94          (if value
95              (apply #'latin1-display latin1-display-sets)
96            (latin1-display))))
97
98 ;;;###autoload
99 (defun latin1-display (&rest sets)
100   "Set up Latin-1/ASCII display for the arguments character SETS.
101 See option `latin1-display' for the method.  The members of the list
102 must be in `latin1-display-sets'.  With no arguments, reset the
103 display for all of `latin1-display-sets'. See also
104 `latin1-display-setup'.  As well as iso-8859 characters, this treats
105 some characters in the `mule-unicode-...' charsets if you don't have
106 a Unicode font with which to display them."
107   (if sets
108       (progn
109         (mapc #'latin1-display-setup sets)
110         (unless (char-displayable-p
111                  (make-char 'mule-unicode-0100-24ff 32 33))
112           ;; It doesn't look as though we have a Unicode font.
113           (map-char-table
114            (lambda (c uc)
115              (when (and (char-valid-p c)
116                         (char-valid-p uc)
117                         (not (aref standard-display-table uc)))
118                (aset standard-display-table uc
119                      (or (aref standard-display-table c)
120                          (vector c)))))
121            ucs-mule-8859-to-mule-unicode)
122           ;; Extra stuff for windows-1252, in particular.
123           (mapc
124            (lambda (l)
125              (apply 'latin1-display-char l))
126            '((?\$,1rz(B ",") ;; SINGLE LOW-9 QUOTATION MARK
127              (?\$,1r~(B ",,") ;; DOUBLE LOW-9 QUOTATION MARK
128              (?\$,1s&(B "...") ;; HORIZONTAL ELLIPSIS
129              (?\$,1s0(B "o/oo") ;; PER MILLE SIGN
130              (?\$,1s9(B "<") ;; SINGLE LEFT-POINTING ANGLE QUOTATION MARK
131              (?\$,1r|(B "``") ;; LEFT DOUBLE QUOTATION MARK
132              (?\$,1r}(B "''") ;; RIGHT DOUBLE QUOTATION MARK
133              (?\$,1rs(B "-") ;; EN DASH
134              (?\$,1rt(B "--") ;; EM DASH
135              (?\$,1ub(B "TM") ;; TRADE MARK SIGN
136              (?\$,1s:(B ">") ;; SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
137              (?$,1s"(B  ",A7(B")
138              )))
139           (setq latin1-display t))
140     (mapc #'latin1-display-reset latin1-display-sets)
141     (aset standard-display-table
142           (make-char 'mule-unicode-0100-24ff) nil)
143     (aset standard-display-table
144           (make-char 'mule-unicode-2500-33ff) nil)
145     (aset standard-display-table
146           (make-char 'mule-unicode-e000-ffff) nil)
147     (setq latin1-display nil)
148     (redraw-display)))
149
150 (defcustom latin1-display-mnemonic nil
151   "Non-nil means to display potentially more mnemonic sequences.
152 These are taken from the tables in `internal.el' rather than the Quail
153 input sequences."
154   :type 'boolean
155   :group 'latin1-display)
156
157 (defcustom latin1-display-face 'default
158   "Face to use for displaying substituted ASCII sequences."
159   :type 'face
160   :version "22.1"
161   :group 'latin1-display)
162
163 (defun latin1-display-char (char display &optional alt-display)
164   "Make an entry in `standard-display-table' for CHAR using string DISPLAY.
165 If ALT-DISPLAY is provided, use that instead if
166 `latin1-display-mnemonic' is non-nil.  The actual string displayed is
167 formatted using `latin1-display-format'.
168
169 DISPLAY and ALT-DISPLAY are either strings or vectors.  String values
170 are formatted using `latin1-display-format' and passed to
171 `standard-display-ascii'; vectors are put into `standard-display-table'
172 asis."
173   (if (and (stringp alt-display)
174            latin1-display-mnemonic)
175       (setq display alt-display))
176   (if (stringp display)
177       (if (eq 'default latin1-display-face)
178           (standard-display-ascii char (format latin1-display-format display))
179         (aset standard-display-table char
180               (vconcat (mapcar (lambda (c) (make-glyph-code c latin1-display-face))
181                                display))))
182     (aset standard-display-table char
183           (make-glyph-code display latin1-display-face))))
184
185 (defun latin1-display-identities (charset)
186   "Display each character in CHARSET as the corresponding Latin-1 character.
187 CHARSET is a symbol which is the nickname of a language environment
188 using an ISO8859 character set."
189   (if (eq charset 'cyrillic)
190       (setq charset 'cyrillic-iso))
191   (let ((i 32)
192         (set (car (remq 'ascii (get-language-info charset 'charset)))))
193     (while (<= i 127)
194       (aset standard-display-table
195             (make-char set i)
196             (vector (make-char 'latin-iso8859-1 i)))
197       (setq i (1+ i)))))
198
199 (defun latin1-display-reset (language)
200   "Set up the default display for each character of LANGUAGE's charset.
201 LANGUAGE is a symbol naming a language environment using an ISO8859
202 character set."
203   (if (eq language 'cyrillic)
204       (setq language 'cyrillic-iso))
205   (let ((charset (if (eq language 'arabic)
206                      'arabic-iso8859-6
207                    (car (remq 'ascii (get-language-info language
208                                                         'charset))))))
209     (standard-display-default (make-char charset 32)
210                               (make-char charset 127)))
211   (sit-for 0))
212
213 (defun latin1-display-check-font (language)
214   "Return non-nil if we have a font with an encoding for LANGUAGE.
215 LANGUAGE is a symbol naming a language environment using an ISO8859
216 character set: `latin-2', `hebrew' etc."
217   (if (eq language 'cyrillic)
218       (setq language 'cyrillic-iso))
219   (let* ((info (get-language-info language 'charset))
220          (char (and info (make-char (car (remq 'ascii info)) ?\ ))))
221     (and char (char-displayable-p char))))
222
223 ;; Backwards compatibility.
224 (defalias 'latin1-char-displayable-p 'char-displayable-p)
225 (make-obsolete 'latin1-char-displayable-p 'char-displayable-p "22.1")
226
227 (defun latin1-display-setup (set &optional force)
228   "Set up Latin-1 display for characters in the given SET.
229 SET must be a member of `latin1-display-sets'.  Normally, check
230 whether a font for SET is available and don't set the display if it
231 is.  If FORCE is non-nil, set up the display regardless."
232   (cond
233    ((eq set 'latin-2)
234     (latin1-display-identities set)
235     (mapc
236      (lambda (l)
237        (or (char-displayable-p (car l))
238            (apply 'latin1-display-char l)))
239        '((?,BF(B "'C" "C'")
240          (?,BP(B "'D" "/D")
241          (?,B&(B "'S" "S'")
242          (?,Bf(B "'c" "c'")
243          (?,Bp(B "'d" "/d")
244          (?,BE(B "'L" "L'")
245          (?,Bq(B "'n" "n'")
246          (?,BQ(B "'N" "N'")
247          (?,B`(B "'r" "r'")
248          (?,B@(B "'R" "R'")
249          (?,B6(B "'s" "s'")
250          (?,B<(B "'z" "z'")
251          (?,B,(B "'Z" "Z'")
252          (?,B!(B "`A" "A;")
253          (?,BJ(B "`E" "E;")
254          (?,B#(B "`L" "/L")
255          (?,B*(B "`S" ",S")
256          (?,B^(B "`T" ",T")
257          (?,B/(B "`Z" "Z^.")
258          (?,B1(B "`a" "a;")
259          (?,B3(B "`l" "/l")
260          (?,Bj(B "`e" "e;")
261          (?,B:(B "`s" ",s")
262          (?,B~(B "`t" ",t")
263          (?,B?(B "`z" "z^.")
264          (?,B(B "`." "'.")
265          (?,BC(B "~A" "A(")
266          (?,BH(B "~C" "C<")
267          (?,BO(B "~D" "D<")
268          (?,BL(B "~E" "E<")
269          (?,Bl(B "~e" "e<")
270          (?,B%(B "~L" "L<")
271          (?,BR(B "~N" "N<")
272          (?,BU(B "~O" "O''")
273          (?,BX(B "~R" "R<")
274          (?,B)(B "~S" "S<")
275          (?,B+(B "~T" "T<")
276          (?,B[(B "~U" "U''")
277          (?,B.(B "~Z" "Z<")
278          (?,Bc(B "~a" "a(}")
279          (?,Bh(B "~c" "c<")
280          (?,Bo(B "~d" "d<")
281          (?,B5(B "~l" "l<")
282          (?,Br(B "~n" "n<")
283          (?,Bu(B "~o" "o''")
284          (?,Bx(B "~r" "r<")
285          (?,B9(B "~s" "s<")
286          (?,B;(B "~t" "t<")
287          (?,B{(B "~u" "u''")
288          (?,B>(B "~z" "z<")
289          (?,B7(B "~v" "'<")                   ; ?,B"(B in latin-pre
290          (?,B"(B "~~" "'(")
291          (?,By(B "uu" "u^0")
292          (?,BY(B "UU" "U^0")
293          (?,BD(B "\"A")
294          (?,Bd(B "\"a")
295          (?,BK(B "\"E" "E:")
296          (?,Bk(B "\"e")
297          (?,B=(B "''" "'")
298          (?,B7(B "'<")                        ; Lynx's rendering of caron
299          )))
300
301    ((eq set 'latin-3)
302     (latin1-display-identities set)
303     (mapc
304      (lambda (l)
305        (or (char-displayable-p (car l))
306            (apply 'latin1-display-char l)))
307        '((?,C!(B "/H")
308          (?,C"(B "~`" "'(")
309          (?,C&(B "^H" "H^")
310          (?,C6(B "^h" "h^")
311          (?,C)(B ".I" "I^.")
312          (?,C*(B ",S")
313          (?,C+(B "~G" "G(")
314          (?,C,(B "^J" "J^")
315          (?,C/(B ".Z" "Z^.")
316          (?,C1(B "/h")
317          (?,C9(B ".i" "i^.")
318          (?,C:(B ",s")
319          (?,C;(B "~g" "g(")
320          (?,C<(B "^j" "j^")
321          (?,C?(B ".Z" "z^.")
322          (?,CE(B ".c" "C^.")
323          (?,CF(B "^C" "C^")
324          (?,CU(B ".G" "G^.")
325          (?,CX(B "^G" "G^")
326          (?,C](B "~U" "U(")
327          (?,C^(B "^S" "S^")
328          (?,Ce(B ".C" "c^.")
329          (?,Cf(B "^c" "c^")
330          (?,Cu(B ".g" "g^.")
331          (?,Cx(B "^g" "g^")
332          (?,C}(B "~u" "u(")
333          (?,C~(B "^s" "s^")
334          (?,C(B "/." "^."))))
335
336    ((eq set 'latin-4)
337     (latin1-display-identities set)
338     (mapc
339      (lambda (l)
340        (or (char-displayable-p (car l))
341            (apply 'latin1-display-char l)))
342        '((?,D!(B "A," "A;")
343          (?,D"(B "k/" "kk")
344          (?,D#(B "R," ",R")
345          (?,D%(B "I~" "?I")
346          (?,D&(B "L," ",L")
347          (?,D)(B "S~" "S<")
348          (?,D*(B "E-")
349          (?,D+(B "G," ",G")
350          (?,D,(B "T/" "/T")
351          (?,D.(B "Z~" "Z<")
352          (?,D1(B "a," "a;")
353          (?,D2(B "';")
354          (?,D3(B "r," ",r")
355          (?,D5(B "i~" "~i")
356          (?,D6(B "l," ",l")
357          (?,D7(B "'<")
358          (?,D9(B "s~" "s<")
359          (?,D:(B "e-")
360          (?,D;(B "g," ",g")
361          (?,D<(B "t/" "/t")
362          (?,D=(B "N/" "NG")
363          (?,D>(B "z~" "z<")
364          (?,D?(B "n/" "ng")
365          (?,D@(B "A-")
366          (?,DG(B "I," "I;")
367          (?,DH(B "C~" "C<")
368          (?,DJ(B "E," "E;")
369          (?,DL(B "E." "E^.")
370          (?,DO(B "I-")
371          (?,DQ(B "N," ",N")
372          (?,DR(B "O-")
373          (?,DS(B "K," ",K")
374          (?,DY(B "U," "U;")
375          (?,D](B "U~" "~U")
376          (?,D^(B "U-")
377          (?,D`(B "a-")
378          (?,Dg(B "i," "i;")
379          (?,Dh(B "c~" "c<")
380          (?,Dj(B "e," "e;")
381          (?,Dl(B "e." "e^.")
382          (?,Do(B "i-")
383          (?,Dp(B "d/" "/d")
384          (?,Dq(B "n," ",n")
385          (?,Dr(B "o-")
386          (?,Ds(B "k," ",k")
387          (?,Dy(B "u," "u;")
388          (?,D}(B "u~" "~u")
389          (?,D~(B "u-")
390          (?,D(B "^."))))
391
392    ((eq set 'latin-5)
393     (latin1-display-identities set)
394     (mapc
395      (lambda (l)
396        (or (char-displayable-p (car l))
397          (apply 'latin1-display-char l)))
398        '((?,Mp(B "~g" "g(")
399          (?,MP(B "~G" "G(")
400          (?,M](B ".I" "I^.")
401          (?,M~(B ",s")
402          (?,M^(B ",S")
403          (?,Mj(B "^e" "e<")                   ; from latin-post
404          (?,Ml(B ".e" "e^.")
405          (?,Mo(B "\"i" "i-")          ; from latin-post
406          (?,M}(B ".i" "i."))))
407
408    ((eq set 'latin-8)
409     (latin1-display-identities set)
410     (mapc
411      (lambda (l)
412        (or (char-displayable-p (car l))
413            (apply 'latin1-display-char l)))
414        '((?,_!(B ".B" "B`")
415          (?,_"(B ".b" "b`")
416          (?,_%(B ".c" "c`")
417          (?,_$(B ".C" "C`")
418          (?,_&(B ".D" "D`")
419          (?,_+(B ".d" "d`")
420          (?,_8(B "`w")
421          (?,_((B "`W")
422          (?,_:(B "'w" "w'")
423          (?,_*(B "'W" "W'")
424          (?,_<(B "`y")
425          (?,_,(B "`Y")
426          (?,_1(B ".f" "f`")
427          (?,_0(B ".F" "F`")
428          (?,_3(B ".g" "g`")
429          (?,_2(B ".G" "G`")
430          (?,_5(B ".m" "m`")
431          (?,_4(B ".M" "M`")
432          (?,_9(B ".p" "p`")
433          (?,_7(B ".P" "P`")
434          (?,_?(B ".s" "s`")
435          (?,_;(B ".S" "S`")
436          (?,_>(B "\"w")
437          (?,_=(B "\"W")
438          (?,_p(B "^w" "w^")
439          (?,_P(B "^W" "W^")
440          (?,_w(B ".t" "t`")
441          (?,_W(B ".T" "T`")
442          (?,_~(B "^y" "y^")
443          (?,_^(B "^Y" "Y^")
444          (?,_/(B "\"Y"))))
445
446    ((eq set 'latin-9)
447     (latin1-display-identities set)
448     (mapc
449      (lambda (l)
450        (or (char-displayable-p (car l))
451            (apply 'latin1-display-char l)))
452        '((?,b((B "~s" "s<")
453          (?,b&(B "~S" "S<")
454          (?,b$(B "Euro" "E=")
455          (?,b8(B "~z" "z<")
456          (?,b4(B "~Z" "Z<")
457          (?,b>(B "\"Y")
458          (?,b=(B "oe")
459          (?,b<(B "OE"))))
460
461    ((eq set 'greek)
462     (mapc
463      (lambda (l)
464        (or (char-displayable-p (car l))
465            (apply 'latin1-display-char l)))
466        '((?,F!(B "9'")
467          (?,F"(B "'9")
468          (?,F/(B "-M")
469          (?,F5(B "'%")
470          (?,F6(B "'A")
471          (?,F8(B "'E")
472          (?,F9(B "'H")
473          (?,F:(B "'I")
474          (?,F<(B "'O")
475          (?,F>(B "'Y")
476          (?,F?(B "W%")
477          (?,F@(B "i3")
478          (?,FC(B "G*")
479          (?,FD(B "D*")
480          (?,FH(B "TH")
481          (?,FK(B "L*")
482          (?,FN(B "C*")
483          (?,FP(B "P*")
484          (?,FS(B "S*")
485          (?,FV(B "F*")
486          (?,FX(B "Q*")
487          (?,FY(B "W*")
488          (?,FZ(B "\"I")
489          (?,F[(B "\"Y")
490          (?,F\(B "a%")
491          (?,F](B "e%")
492          (?,F^(B "y%")
493          (?,F_(B "i%")
494          (?,F`(B "u3")
495          (?,Fa(B "a*")
496          (?,Fb(B "b*")
497          (?,Fc(B "g*")
498          (?,Fd(B "d*")
499          (?,Fe(B "e*")
500          (?,Ff(B "z*")
501          (?,Fg(B "y*")
502          (?,Fh(B "h*")
503          (?,Fi(B "i*")
504          (?,Fj(B "k")
505          (?,Fk(B "l*")
506          (?,Fl(B "m*")
507          (?,Fm(B "n*")
508          (?,Fn(B "c*")
509          (?,Fp(B "p*")
510          (?,Fq(B "r*")
511          (?,Fr(B "*s")
512          (?,Fs(B "s*")
513          (?,Ft(B "t*")
514          (?,Fu(B "u")
515          (?,Fv(B "f*")
516          (?,Fw(B "x*")
517          (?,Fx(B "q*")
518          (?,Fy(B "w*")
519          (?,Fz(B "\"i")
520          (?,F{(B "\"u")
521          (?,F|(B "'o")
522          (?,F}(B "'u")
523          (?,F~(B "'w")))
524     (mapc
525      (lambda (l)
526        (or (char-displayable-p (car l))
527            (aset standard-display-table (car l) (string-to-vector (cadr l)))))
528        '((?,FA(B "A")
529          (?,FB(B "B")
530          (?,FE(B "E")
531          (?,FF(B "Z")
532          (?,FG(B "H")
533          (?,FI(B "I")
534          (?,FJ(B "J")
535          (?,FL(B "M")
536          (?,FM(B "N")
537          (?,FO(B "O")
538          (?,FQ(B "P")
539          (?,FT(B "T")
540          (?,FU(B "Y")
541          (?,FW(B "X")
542          (?,Fo(B "o"))))
543
544    ((eq set 'hebrew)
545     ;; Don't start with identities, since we don't have definitions
546     ;; for a lot of Hebrew in internal.el.  (Intlfonts is also
547     ;; missing some glyphs.)
548     (let ((i 34))
549       (while (<= i 62)
550         (aset standard-display-table
551               (make-char 'hebrew-iso8859-8 i)
552               (vector (make-char 'latin-iso8859-1 i)))
553         (setq i (1+ i))))
554     (mapc
555      (lambda (l)
556        (or (char-displayable-p (car l))
557            (aset standard-display-table (car l) (string-to-vector (cadr l)))))
558        '((?,H_(B "=2")
559          (?,H`(B "A+")
560          (?,Ha(B "B+")
561          (?,Hb(B "G+")
562          (?,Hc(B "D+")
563          (?,Hd(B "H+")
564          (?,He(B "W+")
565          (?,Hf(B "Z+")
566          (?,Hg(B "X+")
567          (?,Hh(B "Tj")
568          (?,Hi(B "J+")
569          (?,Hj(B "K%")
570          (?,Hk(B "K+")
571          (?,Hl(B "L+")
572          (?,Hm(B "M%")
573          (?,Hn(B "M+")
574          (?,Ho(B "N%")
575          (?,Hp(B "N+")
576          (?,Hq(B "S+")
577          (?,Hr(B "E+")
578          (?,Hs(B "P%")
579          (?,Ht(B "P+")
580          (?,Hu(B "Zj")
581          (?,Hv(B "ZJ")
582          (?,Hw(B "Q+")
583          (?,Hx(B "R+")
584          (?,Hy(B "Sh")
585          (?,Hz(B "T+"))))
586
587    ;; Arabic probably isn't so useful in the absence of Arabic
588    ;; language support...
589    ((eq set 'arabic)
590     (setq set 'arabic)
591     (or (char-displayable-p ?,G (B)
592         (aset standard-display-table ?,G (B ",A (B"))
593     (or (char-displayable-p ?,G$(B)
594         (aset standard-display-table ?,G$(B ",A$(B"))
595     (or (char-displayable-p ?,G-(B)
596         (aset standard-display-table ?,G-(B ",A-(B"))
597     (mapc (lambda (l)
598             (or (char-displayable-p (car l))
599                 (apply  'latin1-display-char l)))
600             '((?,G,(B ",+")
601               (?,G;(B ";+")
602               (?,G?(B "?+")
603               (?,GA(B "H'")
604               (?,GB(B "aM")
605               (?,GC(B "aH")
606               (?,GD(B "wH")
607               (?,GE(B "ah")
608               (?,GF(B "yH")
609               (?,GG(B "a+")
610               (?,GH(B "b+")
611               (?,GI(B "tm")
612               (?,GJ(B "t+")
613               (?,GK(B "tk")
614               (?,GL(B "g+")
615               (?,GM(B "hk")
616               (?,GN(B "x+")
617               (?,GO(B "d+")
618               (?,GP(B "dk")
619               (?,GQ(B "r+")
620               (?,GR(B "z+")
621               (?,GS(B "s+")
622               (?,GT(B "sn")
623               (?,GU(B "c+")
624               (?,GV(B "dd")
625               (?,GW(B "tj")
626               (?,GX(B "zH")
627               (?,GY(B "e+")
628               (?,GZ(B "i+")
629               (?,G`(B "++")
630               (?,Ga(B "f+")
631               (?,Gb(B "q+")
632               (?,Gc(B "k+")
633               (?,Gd(B "l+")
634               (?,Ge(B "m+")
635               (?,Gf(B "n+")
636               (?,Gg(B "h+")
637               (?,Gh(B "w+")
638               (?,Gi(B "j+")
639               (?,Gj(B "y+")
640               (?,Gk(B ":+")
641               (?,Gl(B "\"+")
642               (?,Gm(B "=+")
643               (?,Gn(B "/+")
644               (?,Go(B "'+")
645               (?,Gp(B "1+")
646               (?,Gq(B "3+")
647               (?,Gr(B "0+"))))
648
649    ((eq set 'cyrillic)
650     (setq set 'cyrillic-iso)
651     (mapc
652      (lambda (l)
653        (or (char-displayable-p (car l))
654            (apply 'latin1-display-char l)))
655        '((?,L"(B "Dj")
656          (?,L#(B "Gj")
657          (?,L$(B "IE")
658          (?,L)(B "Lj")
659          (?,L*(B "Nj")
660          (?,L+(B "Ts")
661          (?,L,(B "Kj")
662          (?,L.(B "V%")
663          (?,L/(B "Dzh")
664          (?,L1(B "B=")
665          (?,L3(B ",Ab(B")
666          (?,L4(B "D")
667          (?,L6(B "Z%")
668          (?,L7(B "3")
669          (?,L8(B "U")
670          (?,L9(B "J=")
671          (?,L;(B "L=")
672          (?,L?(B "P=")
673          (?,LC(B "Y")
674          (?,LD(B ",Ah(B")
675          (?,LF(B "C=")
676          (?,LG(B "C%")
677          (?,LH(B "S%")
678          (?,LI(B "Sc")
679          (?,LJ(B "=\"")
680          (?,LK(B "Y=")
681          (?,LL(B "%\"")
682          (?,LM(B "Ee")
683          (?,LN(B "Yu")
684          (?,LO(B "Ya")
685          (?,LQ(B "b")
686          (?,LR(B "v=")
687          (?,LS(B "g=")
688          (?,LT(B "g")
689          (?,LV(B "z%")
690          (?,LW(B "z=")
691          (?,LX(B "u")
692          (?,LY(B "j=")
693          (?,LZ(B "k")
694          (?,L[(B "l=")
695          (?,L\(B "m=")
<