annotate lisp/international/latin1-disp.el @ 35724:f2e26e453776

XEmacs compatibility and doc fixes from Vinicius Jose Latorre <vinicius@cpqd.com.br>: (lpr-windows-system, lpr-lp-system): New vars. (lpr-printer-switch): New defcustom. (printer-name, lpr-command): Customization fix. (print-region-1): Code fix. (print-region-new-buffer, printify-region): Indentation fix. (lpr-eval-switch, lpr-flatten-list, lpr-flatten-list-1): New funcsions.
author Eli Zaretskii <eliz@gnu.org>
date Tue, 30 Jan 2001 12:01:54 +0000
parents 84a59a4308f6
children bd020356c644
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
35365
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
50 ;; Ensure `standard-display-table' is set up:
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
51 (require 'disp-table)
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
52
31673
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
53 (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
54 latin-9 cyrillic greek hebrew)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
55 "The ISO8859 character sets with defined Latin-1 display sequences.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
56 These are the nicknames for the sets and correspond to Emacs language
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
57 environments.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
58
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
59 (defgroup latin1-display ()
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
60 "Set up display tables for ISO8859 characters using Latin-1."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
61 :version "21.1"
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
62 :group 'i18n)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
63
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
64 (defcustom latin1-display-format "{%s}"
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
65 "A format string used to display the ASCII sequences.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
66 The default encloses the sequence in braces, but you could just use
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
67 \"%s\" to avoid the braces."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
68 :group 'latin1-display
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
69 :type 'string)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
70
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
71 ;;;###autoload
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
72 (defcustom latin1-display nil
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
73 "Set up Latin-1/ASCII display for ISO8859 character sets.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
74 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
75 if no font is available to display it. Characters are displayed using
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
76 the corresponding Latin-1 characters where they match. Otherwise
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
77 ASCII sequences are used, mostly following the Latin prefix input
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
78 methods. Some different ASCII sequences are used if
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
79 `latin1-display-mnemonic' is non-nil.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
80
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
81 Setting this variable directly does not take effect;
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
82 use either M-x customize of the function `latin1-display'."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
83 :group 'latin1-display
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
84 :type 'boolean
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
85 :require 'latin1-disp
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
86 :initialize 'custom-initialize-default
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
87 :set (lambda (symbol value)
35365
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
88 (set-default symbol value)
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
89 (mapc (if value
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
90 #'latin1-display-setup
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
91 #'latin1-display-reset)
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
92 latin1-display-sets)
84a59a4308f6 Require disp-table.
Dave Love <fx@gnu.org>
parents: 33412
diff changeset
93 (redraw-display)))
31673
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
94
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
95 ;;;###autoload
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
96 (defun latin1-display (&rest sets)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
97 "Set up Latin-1/ASCII display for the arguments character SETS.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
98 See option `latin1-display' for the method. The members of the list
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
99 must be in `latin1-display-sets'. With no arguments, reset the
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
100 display for all of `latin1-display-sets'. See also `latin1-display-setup'."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
101 (if sets
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
102 (mapc #'latin1-display-setup sets)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
103 (mapc #'latin1-display-reset latin1-display-sets)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
104
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
105 (defcustom latin1-display-mnemonic nil
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
106 "Non-nil means to display potentially more mnemonic sequences.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
107 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
108 input sequences."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
109 :type 'boolean
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
110 :group 'latin1-display)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
111
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
112 (defun latin1-display-char (char display &optional alt-display)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
113 "Make an entry in `standard-display-table' for CHAR using string DISPLAY.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
114 If ALT-DISPLAY is provided, use that instead if
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
115 `latin1-display-mnemonic' is non-nil. The actual string displayed is
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
116 formatted using `latin1-display-format'."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
117 (if (and (stringp alt-display)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
118 latin1-display-mnemonic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
119 (setq display alt-display))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
120 (if (stringp display)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
121 (standard-display-ascii char (format latin1-display-format display))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
122 (aset standard-display-table char display)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
123
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
124 (defun latin1-display-identities (charset)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
125 "Display each character in CHARSET as the corresponding Latin-1 character.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
126 CHARSET is a symbol naming a language environment using an ISO8859
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
127 character set."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
128 (if (eq charset 'cyrillic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
129 (setq charset 'cyrillic-iso))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
130 (let ((i 32)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
131 (set (car (remq 'ascii (get-language-info charset 'charset)))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
132 (while (<= i 127)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
133 (aset standard-display-table
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
134 (make-char set i)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
135 (vector (make-char 'latin-iso8859-1 i)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
136 (setq i (1+ i)))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
137
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
138 (defun latin1-display-reset (language)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
139 "Set up the default display for each character of LANGUAGE's charset.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
140 CHARSET is a symbol naming a language environment using an ISO8859
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
141 character set."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
142 (if (eq language 'cyrillic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
143 (setq language 'cyrillic-iso))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
144 (let ((charset (car (remq 'ascii (get-language-info language
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
145 'charset)))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
146 (standard-display-default (make-char charset 32)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
147 (make-char charset 127)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
148 (sit-for 0))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
149
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
150 (defun latin1-display-check-font (language)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
151 "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
152 LANGUAGE is a symbol naming a language environment using an ISO8859
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
153 character set: `latin-2', `hebrew' etc."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
154 (if (eq language 'cyrillic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
155 (setq language 'cyrillic-iso))
32785
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
156 (let* ((info (get-language-info language 'charset))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
157 (char (make-char (car (remq 'ascii info)) ?\ )))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
158 (latin1-char-displayable-p char)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
159
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
160 ;; 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
161 (defun latin1-char-displayable-p (char)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
162 (cond ((< char 256)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
163 ;; Single byte characters are always displayable.
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
164 t)
32997
00c403ac9e5e (latin1-char-displayable-p): Don't
Dave Love <fx@gnu.org>
parents: 32785
diff changeset
165 ((display-multi-font-p)
32785
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
166 ;; 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
167 ;; 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
168 ;; currently selected frame.
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
169 (let ((fontset (frame-parameter (selected-frame) 'font))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
170 font-pattern)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
171 (if (query-fontset fontset)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
172 (setq font-pattern (fontset-font fontset char)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
173 (or font-pattern
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
174 (setq font-pattern (fontset-font "fontset-default" char)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
175 (if font-pattern
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
176 (progn
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
177 ;; Now FONT-PATTERN is a string or a cons of family
33412
d85712cf7ea3 formatting only
Dave Love <fx@gnu.org>
parents: 32997
diff changeset
178 ;; field pattern and registry field pattern.
32785
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
179 (or (stringp font-pattern)
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
180 (setq font-pattern (concat (or (car font-pattern) "*")
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
181 "-*-"
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
182 (cdr font-pattern))))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
183 (x-list-fonts font-pattern 'default (selected-frame) 1)))))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
184 (t
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
185 (let ((coding (terminal-coding-system)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
186 (if coding
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
187 (let ((safe-chars (coding-system-get coding 'safe-chars))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
188 (safe-charsets (coding-system-get coding 'safe-charsets)))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
189 (or (and safe-chars
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
190 (aref safe-chars char))
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
191 (and safe-charsets
fc837c2f746a (latin1-char-displayable-p): New
Dave Love <fx@gnu.org>
parents: 31673
diff changeset
192 (memq (char-charset char) safe-charsets)))))))))
31673
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
193
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
194 (defun latin1-display-setup (set &optional force)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
195 "Set up Latin-1 display for characters in the given SET.
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
196 SET must be a member of `latin1-display-sets'. Normally, check
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
197 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
198 is. If FORCE is non-nil, set up the display regardless."
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
199 (cond
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
200 ((eq set 'latin-2)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
201 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
202 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
203 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
204 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
205 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
206 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
207 '((? "'C" "C'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
208 (? "'D" "/D")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
209 (? "'S" "S'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
210 (? "'c" "c'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
211 (? "'d" "/d")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
212 (? "'L" "L'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
213 (? "'n" "n'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
214 (? "'N" "N'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
215 (? "'r" "r'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
216 (? "'R" "R'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
217 (? "'s" "s'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
218 (? "'z" "z'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
219 (? "'Z" "Z'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
220 (? "`A" "A;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
221 (? "`E" "E;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
222 (? "`L" "/L")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
223 (? "`S" ",S")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
224 (? "`T" ",T")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
225 (? "`Z" "Z^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
226 (? "`a" "a;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
227 (? "`l" "/l")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
228 (? "`e" "e;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
229 (? "`s" ",s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
230 (? "`t" ",t")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
231 (? "`z" "z^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
232 (? "`." "'.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
233 (? "~A" "A(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
234 (? "~C" "C<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
235 (? "~D" "D<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
236 (? "~E" "E<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
237 (? "~e" "e<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
238 (? "~L" "L<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
239 (? "~N" "N<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
240 (? "~O" "O''")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
241 (? "~R" "R<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
242 (? "~S" "S<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
243 (? "~T" "T<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
244 (? "~U" "U''")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
245 (? "~Z" "Z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
246 (? "~a" "a(}")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
247 (? "~c" "c<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
248 (? "~d" "d<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
249 (? "~l" "l<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
250 (? "~n" "n<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
251 (? "~o" "o''")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
252 (? "~r" "r<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
253 (? "~s" "s<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
254 (? "~t" "t<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
255 (? "~u" "u''")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
256 (? "~z" "z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
257 (? "~v" "'<") ; ? in latin-pre
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
258 (? "~~" "'(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
259 (? "uu" "u^0")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
260 (? "UU" "U^0")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
261 (? "\"A")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
262 (? "\"a")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
263 (? "\"E" "E:")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
264 (? "\"e")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
265 (? "''" "'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
266 (? "'<") ; Lynx's rendering of caron
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
267 ))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
268
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
269 ((eq set 'latin-3)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
270 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
271 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
272 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
273 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
274 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
275 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
276 '((? "/H")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
277 (? "~`" "'(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
278 (? "^H" "H^")
33412
d85712cf7ea3 formatting only
Dave Love <fx@gnu.org>
parents: 32997
diff changeset
279 (? "^h" "h^")
d85712cf7ea3 formatting only
Dave Love <fx@gnu.org>
parents: 32997
diff changeset
280 (? ".I" "I^.")
31673
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
281 (? ",S")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
282 (? "~G" "G(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
283 (? "^J" "J^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
284 (? ".Z" "Z^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
285 (? "/h")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
286 (? ".i" "i^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
287 (? ",s")
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 (? "^j" "j^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
290 (? ".Z" "z^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
291 (? ".c" "C^.")
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 (? ".G" "G^.")
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 (? "~U" "U(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
296 (? "^S" "S^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
297 (? ".C" "c^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
298 (? "^c" "c^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
299 (? ".g" "g^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
300 (? "^g" "g^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
301 (? "~u" "u(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
302 (? "^s" "s^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
303 (? "/." "^.")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
304
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
305 ((eq set 'latin-4)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
306 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
307 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
308 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
309 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
310 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
311 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
312 '((? "A," "A;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
313 (? "k/" "kk")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
314 (? "R," ",R")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
315 (? "I~" "?I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
316 (? "L," ",L")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
317 (? "S~" "S<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
318 (? "E-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
319 (? "G," ",G")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
320 (? "T/" "/T")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
321 (? "Z~" "Z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
322 (? "a," "a;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
323 (? "';")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
324 (? "r," ",r")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
325 (? "i~" "~i")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
326 (? "l," ",l")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
327 (? "'<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
328 (? "s~" "s<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
329 (? "e-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
330 (? "g," ",g")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
331 (? "t/" "/t")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
332 (? "N/" "NG")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
333 (? "z~" "z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
334 (? "n/" "ng")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
335 (? "A-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
336 (? "I," "I;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
337 (? "C~" "C<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
338 (? "E," "E;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
339 (? "E." "E^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
340 (? "I-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
341 (? "N," ",N")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
342 (? "O-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
343 (? "K," ",K")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
344 (? "U," "U;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
345 (? "U~" "~U")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
346 (? "U-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
347 (? "a-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
348 (? "i," "i;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
349 (? "c~" "c<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
350 (? "e," "e;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
351 (? "e." "e^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
352 (? "i-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
353 (? "d/" "/d")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
354 (? "n," ",n")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
355 (? "o-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
356 (? "k," ",k")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
357 (? "u," "u;")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
358 (? "u~" "~u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
359 (? "u-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
360 (? "^.")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
361
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
362 ((eq set 'latin-5)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
363 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
364 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
365 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
366 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
367 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
368 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
369 '((? "~g" "g(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
370 (? "~G" "G(")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
371 (? ".I" "I^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
372 (? ",s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
373 (? ",S")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
374 (? "^e" "e<") ; from latin-post
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
375 (? ".e" "e^.")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
376 (? "\"i" "i-") ; from latin-post
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
377 (? ".i" "i.")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
378
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
379 ((eq set 'latin-8)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
380 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
381 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
382 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
383 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
384 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
385 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
386 '((? ".B" "B`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
387 (? ".b" "b`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
388 (? ".c" "c`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
389 (? ".C" "C`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
390 (? ".D" "D`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
391 (? ".d" "d`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
392 (? "`w")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
393 (? "`W")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
394 (? "'w" "w'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
395 (? "'W" "W'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
396 (? "`y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
397 (? "`Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
398 (? ".f" "f`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
399 (? ".F" "F`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
400 (? ".g" "g`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
401 (? ".G" "G`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
402 (? ".m" "m`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
403 (? ".M" "M`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
404 (? ".p" "p`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
405 (? ".P" "P`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
406 (? ".s" "s`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
407 (? ".S" "S`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
408 (? "\"w")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
409 (? "\"W")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
410 (? "^w" "w^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
411 (? "^W" "W^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
412 (? ".t" "t`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
413 (? ".T" "T`")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
414 (? "^y" "y^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
415 (? "^Y" "Y^")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
416 (? "\"Y")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
417
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
418 ((eq set 'latin-9)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
419 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
420 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
421 (latin1-display-identities set)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
422 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
423 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
424 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
425 '((? "~s" "s<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
426 (? "~S" "S<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
427 (? "Euro" "E=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
428 (? "~z" "z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
429 (? "~Z" "Z<")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
430 (? "\"Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
431 (? "oe")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
432 (? "OE")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
433
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
434 ((eq set 'greek)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
435 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
436 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
437 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
438 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
439 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
440 '((? "9'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
441 (? "'9")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
442 (? "-M")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
443 (? "'%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
444 (? "'A")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
445 (? "'E")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
446 (? "'H")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
447 (? "'I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
448 (? "'O")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
449 (? "'Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
450 (? "W%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
451 (? "i3")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
452 (? "G*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
453 (? "D*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
454 (? "TH")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
455 (? "L*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
456 (? "C*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
457 (? "P*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
458 (? "S*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
459 (? "F*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
460 (? "Q*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
461 (? "W*")
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 (? "\"Y")
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 (? "e%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
466 (? "y%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
467 (? "i%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
468 (? "u3")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
469 (? "a*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
470 (? "b*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
471 (? "g*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
472 (? "d*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
473 (? "e*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
474 (? "z*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
475 (? "y*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
476 (? "h*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
477 (? "i*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
478 (? "k")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
479 (? "l*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
480 (? "m*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
481 (? "n*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
482 (? "c*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
483 (? "p*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
484 (? "r*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
485 (? "*s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
486 (? "s*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
487 (? "t*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
488 (? "u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
489 (? "f*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
490 (? "x*")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
491 (? "q*")
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 (? "\"i")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
494 (? "\"u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
495 (? "'o")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
496 (? "'u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
497 (? "'w")))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
498 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
499 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
500 (aset standard-display-table (car l) (string-to-vector (cadr l))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
501 '((? "A")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
502 (? "B")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
503 (? "E")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
504 (? "Z")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
505 (? "H")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
506 (? "I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
507 (? "J")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
508 (? "M")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
509 (? "N")
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 (? "P")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
512 (? "T")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
513 (? "Y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
514 (? "X")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
515 (? "o")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
516
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
517 ((eq set 'hebrew)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
518 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
519 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
520 ;; Don't start with identities, since we don't have definitions
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
521 ;; for a lot of Hebrew in internal.el. (Intlfonts is also
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
522 ;; missing some glyphs.)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
523 (let ((i 34))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
524 (while (<= i 62)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
525 (aset standard-display-table
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
526 (make-char 'hebrew-iso8859-8 i)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
527 (vector (make-char 'latin-iso8859-1 i)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
528 (setq i (1+ i))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
529 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
530 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
531 (aset standard-display-table (car l) (string-to-vector (cadr l))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
532 '((? "=2")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
533 (? "A+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
534 (? "B+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
535 (? "G+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
536 (? "D+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
537 (? "H+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
538 (? "W+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
539 (? "Z+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
540 (? "X+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
541 (? "Tj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
542 (? "J+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
543 (? "K%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
544 (? "K+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
545 (? "L+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
546 (? "M%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
547 (? "M+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
548 (? "N%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
549 (? "N+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
550 (? "S+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
551 (? "E+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
552 (? "P%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
553 (? "P+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
554 (? "Zj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
555 (? "ZJ")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
556 (? "Q+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
557 (? "R+")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
558 (? "Sh")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
559 (? "T+")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
560
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
561 ((eq set 'cyrillic)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
562 (setq set 'cyrillic-iso)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
563 (when (or force
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
564 (not (latin1-display-check-font set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
565 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
566 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
567 (apply 'latin1-display-char l))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
568 '((? "Dj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
569 (? "Gj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
570 (? "IE")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
571 (? "Lj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
572 (? "Nj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
573 (? "Ts")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
574 (? "Kj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
575 (? "V%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
576 (? "Dzh")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
577 (? "B=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
578 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
579 (? "D")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
580 (? "Z%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
581 (? "3")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
582 (? "U")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
583 (? "J=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
584 (? "L=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
585 (? "P=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
586 (? "Y")
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 (? "C=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
589 (? "C%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
590 (? "S%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
591 (? "Sc")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
592 (? "=\"")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
593 (? "Y=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
594 (? "%\"")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
595 (? "Ee")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
596 (? "Yu")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
597 (? "Ya")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
598 (? "b")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
599 (? "v=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
600 (? "g=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
601 (? "g")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
602 (? "z%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
603 (? "z=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
604 (? "u")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
605 (? "j=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
606 (? "k")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
607 (? "l=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
608 (? "m=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
609 (? "n=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
610 (? "n")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
611 (? "p")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
612 (? "t=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
613 (? "f=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
614 (? "c=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
615 (? "c%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
616 (? "s%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
617 (? "sc")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
618 (? "='")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
619 (? "y=")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
620 (? "%'")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
621 (? "ee")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
622 (? "yu")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
623 (? "ya")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
624 (? "N0")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
625 (? "dj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
626 (? "gj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
627 (? "ie")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
628 (? "lj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
629 (? "nj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
630 (? "ts")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
631 (? "kj")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
632 (? "v%")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
633 (? "dzh")))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
634 (mapc
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
635 (lambda (l)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
636 (aset standard-display-table (car l) (string-to-vector (cadr l))))
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 (? "S")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
639 (? "I")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
640 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
641 (? "J")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
642 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
643 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
644 (? "-")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
645 (? "A")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
646 (? "B")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
647 (? "E")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
648 (? "K")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
649 (? "M")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
650 (? "H")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
651 (? "O")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
652 (? "P")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
653 (? "C")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
654 (? "T")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
655 (? "X")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
656 (? "a")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
657 (? "e")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
658 (? "o")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
659 (? "c")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
660 (? "y")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
661 (? "x")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
662 (? "s")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
663 (? "i")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
664 (? "")
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
665 (? "j")))))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
666
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
667 (t (error "Unsupported character set: %S" set)))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
668
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
669 (sit-for 0))
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
670
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
671 (provide 'latin1-disp)
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
672
6d39ec089c7b *** empty log message ***
Dave Love <fx@gnu.org>
parents:
diff changeset
673 ;;; latin1-disp.el ends here