diff lisp/mule/mule-cmds.el @ 4498:f0c81cd2a959

Merge.
author Mats Lidell <matsl@xemacs.org>
date Sun, 10 Aug 2008 23:24:15 +0200
parents 67fbcaf3dbdc
children 774e5c7522bf
line wrap: on
line diff
--- a/lisp/mule/mule-cmds.el	Sun Aug 03 23:21:31 2008 +0200
+++ b/lisp/mule/mule-cmds.el	Sun Aug 10 23:24:15 2008 +0200
@@ -225,7 +225,15 @@
 
                      If there is no value for this property, the MS Windows
                      locale is assumed to have the same name as the
-                     language environment."
+                     language environment.
+
+  invalid-sequence-coding-system
+                     VALUE is a fixed-width 8-bit coding system used to
+                     display Unicode error sequences (using a face to make
+                     it clear that the data is invalid).  In Western Europe
+                     this is normally windows-1252; in the Russia and the
+                     former Soviet Union koi8-ru or windows-1251 makes more
+                     sense."
   (if (symbolp lang-env)
       (setq lang-env (symbol-name lang-env)))
   (let (lang-slot prop-slot)
@@ -760,6 +768,25 @@
     (if (functionp func)
 	(funcall func)))
 
+  (let ((invalid-sequence-coding-system
+         (get-language-info language-name 'invalid-sequence-coding-system))
+        (disp-table (specifier-instance current-display-table))
+        glyph)
+    (when (consp invalid-sequence-coding-system)
+      (setq invalid-sequence-coding-system
+            (car invalid-sequence-coding-system)))
+    (map-char-table
+     #'(lambda (key entry)
+         (setq glyph (make-glyph
+                      (vector
+                       'string :data
+                       (decode-coding-string (string entry)
+                                             invalid-sequence-coding-system))))
+         (set-glyph-face glyph 'unicode-invalid-sequence-warning-face)
+         (put-char-table key glyph disp-table)
+         nil)
+     unicode-error-default-translation-table))
+
   ;; Fit the charsets preferences in unicode conversions for the
   ;; language environment.
   (set-language-unicode-precedence-list