diff options
author | Dave Love <fx@gnu.org> | 2003-03-13 23:02:19 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2003-03-13 23:02:19 +0000 |
commit | 87f506c3f6431c291d0a2350eef0cace9d0c28c2 (patch) | |
tree | 60527b1fb10759c282f59f58521c8f91186b2014 | |
parent | 21a3d3e7c97da660fd5c45b9d0d2c5a969b2e3b7 (diff) | |
download | emacs-87f506c3f6431c291d0a2350eef0cace9d0c28c2.tar.gz |
(ucs-tables): Don't require.
(latin1-display-face): New.
(latin1-display-char): Use it.
-rw-r--r-- | lisp/ChangeLog | 6 | ||||
-rw-r--r-- | lisp/international/latin1-disp.el | 23 |
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 @@ +2003-03-13 Dave Love <fx@gnu.org> + + * international/latin1-disp.el (ucs-tables): Don't require. + (latin1-display-face): New. + (latin1-display-char): Use it. + 2003-03-13 Kenichi Handa <handa@m17n.org> * 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 @@ ;; Ensure `standard-display-table' is set up: (require 'disp-table) -(require 'ucs-tables) (defconst latin1-display-sets '(latin-2 latin-3 latin-4 latin-5 latin-8 latin-9 arabic cyrillic greek hebrew) @@ -66,7 +65,8 @@ environments.") (defcustom latin1-display-format "{%s}" "A format string used to display the ASCII sequences. The default encloses the sequence in braces, but you could just use -\"%s\" to avoid the braces." +\"%s\" to avoid the braces, maybe with a non-default value of +`latin1-display-face'." :group 'latin1-display :type 'string) @@ -152,6 +152,12 @@ input sequences." :type 'boolean :group 'latin1-display) +(defcustom latin1-display-face 'default + "Face to use for displaying substituted ASCII sequences." + :type 'face + :version "21.4" + :group 'latin1-display) + (defun latin1-display-char (char display &optional alt-display) "Make an entry in `standard-display-table' for CHAR using string DISPLAY. If ALT-DISPLAY is provided, use that instead if @@ -166,8 +172,17 @@ asis." latin1-display-mnemonic) (setq display alt-display)) (if (stringp display) - (standard-display-ascii char (format latin1-display-format display)) - (aset standard-display-table char display))) + (if (eq 'default latin1-display-face) + (standard-display-ascii char (format latin1-display-format display)) + (aset standard-display-table char + (vconcat (mapcar (lambda (c) + (logior c (lsh (face-id latin1-display-face) + 19))) + display)))) + (aset standard-display-table char + (if (eq 'default latin1-display-face) + display + (logior display (lsh (face-id latin1-display-face) 19)))))) (defun latin1-display-identities (charset) "Display each character in CHARSET as the corresponding Latin-1 character. |