changeset 91968:28f7a9f11ad1

(latin1-display): Don't use ucs-mule-8859-to-mule-unicode. Fix the way of resettting standard-display-table. (latin1-display-identities): Adjusted for the change of what is returned by (get-language-info charset 'charset).
author Kenichi Handa <handa@m17n.org>
date Wed, 20 Feb 2008 04:43:26 +0000
parents 39b7a7b122f8
children da2b5a9b0384
files lisp/international/latin1-disp.el
diffstat 1 files changed, 7 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/latin1-disp.el	Wed Feb 20 04:41:25 2008 +0000
+++ b/lisp/international/latin1-disp.el	Wed Feb 20 04:43:26 2008 +0000
@@ -101,24 +101,12 @@
 See option `latin1-display' for the method.  The members of the list
 must be in `latin1-display-sets'.  With no arguments, reset the
 display for all of `latin1-display-sets'. See also
-`latin1-display-setup'.  As well as iso-8859 characters, this treats
-some characters in the `mule-unicode-...' charsets if you don't have
-a Unicode font with which to display them."
+`latin1-display-setup'."
   (if sets
       (progn
 	(mapc #'latin1-display-setup sets)
 	(unless (char-displayable-p
 		 (make-char 'mule-unicode-0100-24ff 32 33))
-	  ;; It doesn't look as though we have a Unicode font.
-	  (map-char-table
-	   (lambda (c uc)
-	     (when (and (characterp c)
-			(characterp uc)
-			(not (aref standard-display-table uc)))
-	       (aset standard-display-table uc
-		     (or (aref standard-display-table c)
-			 (vector c)))))
-	   ucs-mule-8859-to-mule-unicode)
 	  ;; Extra stuff for windows-1252, in particular.
 	  (mapc
 	   (lambda (l)
@@ -138,12 +126,8 @@
 	     )))
 	  (setq latin1-display t))
     (mapc #'latin1-display-reset latin1-display-sets)
-    (aset standard-display-table
-	  (make-char 'mule-unicode-0100-24ff) nil)
-    (aset standard-display-table
-	  (make-char 'mule-unicode-2500-33ff) nil)
-    (aset standard-display-table
-	  (make-char 'mule-unicode-e000-ffff) nil)
+    (set-char-table-range standard-display-table '(#x0100 #x33FF) nil)
+    (set-char-table-range standard-display-table '(#xE000 #xFFFF) nil)
     (setq latin1-display nil)
     (redraw-display)))
 
@@ -191,9 +175,10 @@
   (let ((i 32)
 	(set (car (remq 'ascii (get-language-info charset 'charset)))))
     (while (<= i 127)
-      (aset standard-display-table
-	    (make-char set i)
-	    (vector (make-char 'latin-iso8859-1 i)))
+      (let ((ch (decode-char set (+ i 128))))
+	(if ch
+	    (aset standard-display-table ch
+		  (vector (make-char 'latin-iso8859-1 i)))))
       (setq i (1+ i)))))
 
 (defun latin1-display-reset (language)