aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2003-03-13 23:02:19 +0000
committerDave Love2003-03-13 23:02:19 +0000
commit87f506c3f6431c291d0a2350eef0cace9d0c28c2 (patch)
tree60527b1fb10759c282f59f58521c8f91186b2014
parent21a3d3e7c97da660fd5c45b9d0d2c5a969b2e3b7 (diff)
downloademacs-87f506c3f6431c291d0a2350eef0cace9d0c28c2.tar.gz
emacs-87f506c3f6431c291d0a2350eef0cace9d0c28c2.zip
(ucs-tables): Don't require.
(latin1-display-face): New. (latin1-display-char): Use it.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/international/latin1-disp.el23
2 files changed, 25 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1701eec8020..fe5dad24233 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12003-03-13 Dave Love <fx@gnu.org>
2
3 * international/latin1-disp.el (ucs-tables): Don't require.
4 (latin1-display-face): New.
5 (latin1-display-char): Use it.
6
12003-03-13 Kenichi Handa <handa@m17n.org> 72003-03-13 Kenichi Handa <handa@m17n.org>
2 8
3 * international/mule-cmds.el (reset-language-environment): Set 9 * international/mule-cmds.el (reset-language-environment): Set
diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el
index 874632f0ba1..1ab79c4f1ac 100644
--- a/lisp/international/latin1-disp.el
+++ b/lisp/international/latin1-disp.el
@@ -49,7 +49,6 @@
49 49
50;; Ensure `standard-display-table' is set up: 50;; Ensure `standard-display-table' is set up:
51(require 'disp-table) 51(require 'disp-table)
52(require 'ucs-tables)
53 52
54(defconst latin1-display-sets '(latin-2 latin-3 latin-4 latin-5 latin-8 53(defconst latin1-display-sets '(latin-2 latin-3 latin-4 latin-5 latin-8
55 latin-9 arabic cyrillic greek hebrew) 54 latin-9 arabic cyrillic greek hebrew)
@@ -66,7 +65,8 @@ environments.")
66(defcustom latin1-display-format "{%s}" 65(defcustom latin1-display-format "{%s}"
67 "A format string used to display the ASCII sequences. 66 "A format string used to display the ASCII sequences.
68The default encloses the sequence in braces, but you could just use 67The default encloses the sequence in braces, but you could just use
69\"%s\" to avoid the braces." 68\"%s\" to avoid the braces, maybe with a non-default value of
69`latin1-display-face'."
70 :group 'latin1-display 70 :group 'latin1-display
71 :type 'string) 71 :type 'string)
72 72
@@ -152,6 +152,12 @@ input sequences."
152 :type 'boolean 152 :type 'boolean
153 :group 'latin1-display) 153 :group 'latin1-display)
154 154
155(defcustom latin1-display-face 'default
156 "Face to use for displaying substituted ASCII sequences."
157 :type 'face
158 :version "21.4"
159 :group 'latin1-display)
160
155(defun latin1-display-char (char display &optional alt-display) 161(defun latin1-display-char (char display &optional alt-display)
156 "Make an entry in `standard-display-table' for CHAR using string DISPLAY. 162 "Make an entry in `standard-display-table' for CHAR using string DISPLAY.
157If ALT-DISPLAY is provided, use that instead if 163If ALT-DISPLAY is provided, use that instead if
@@ -166,8 +172,17 @@ asis."
166 latin1-display-mnemonic) 172 latin1-display-mnemonic)
167 (setq display alt-display)) 173 (setq display alt-display))
168 (if (stringp display) 174 (if (stringp display)
169 (standard-display-ascii char (format latin1-display-format display)) 175 (if (eq 'default latin1-display-face)
170 (aset standard-display-table char display))) 176 (standard-display-ascii char (format latin1-display-format display))
177 (aset standard-display-table char
178 (vconcat (mapcar (lambda (c)
179 (logior c (lsh (face-id latin1-display-face)
180 19)))
181 display))))
182 (aset standard-display-table char
183 (if (eq 'default latin1-display-face)
184 display
185 (logior display (lsh (face-id latin1-display-face) 19))))))
171 186
172(defun latin1-display-identities (charset) 187(defun latin1-display-identities (charset)
173 "Display each character in CHARSET as the corresponding Latin-1 character. 188 "Display each character in CHARSET as the corresponding Latin-1 character.