annotate lisp/international/latin1-disp.el @ 34097:0225d8e15f2c

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