comparison lisp/mule/latin.el @ 4489:b75b075a9041

Support displaying invalid UTF-8 in language-environment-specific ways. 2008-08-05 Aidan Kehoe <kehoea@parhasard.net> * specifier.el (current-display-table): Initialise this here, not in x-init.el, since we want it even on non-X builds to use the support for displaying Unicode error sequences according to the current locale. * mule/mule-cmds.el (set-language-info): Document error-sequence-coding-system, used to describe how to display characters that are not valid Unicode on disk. * mule/mule-cmds.el (finish-set-language-environment): Implement error-sequence-coding-system. * unicode.el (unicode-error-sequence-warning-face): New face, to make it possible to distinguish invalid Unicode sequences from the characters given by the valid Unicode sequences. * mule/cyrillic.el ("Russian"): ("Ukrainian"): ("Bulgarian"): ("Belarusian"): ("Cyrillic-ALT"): Add support for error-sequence-coding-system for all these languages. * mule/latin.el: Add support for error-sequence-coding-system for the Latin-alphabet language environments.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 05 Aug 2008 09:06:41 +0200
parents 15dd5229cea5
children 67fbcaf3dbdc
comparison
equal deleted inserted replaced
4488:6b0000935adc 4489:b75b075a9041
955 ;; Language environments. 955 ;; Language environments.
956 (loop 956 (loop
957 for ((charset codesys default-input nice-charset-1 nice-charset-2 957 for ((charset codesys default-input nice-charset-1 nice-charset-2
958 ;; supported-langs is a list if the doc string is replaced 958 ;; supported-langs is a list if the doc string is replaced
959 ;; entirely 959 ;; entirely
960 supported-langs) 960 supported-langs error-sequence-coding-system)
961 langenvs) in 961 langenvs) in
962 '(((latin-iso8859-1 iso-8859-1 "latin-1-prefix" "Latin-1" "ISO-8859-1" 962 '(((latin-iso8859-1 iso-8859-1 "latin-1-prefix" "Latin-1" "ISO-8859-1"
963 " Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic, 963 " Danish, Dutch, English, Faeroese, Finnish, French, German, Icelandic,
964 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish.") 964 Irish, Italian, Norwegian, Portuguese, Spanish, and Swedish."
965 windows-1252)
965 (("Danish" "da") 966 (("Danish" "da")
966 ("Dutch" "nl" "TUTORIAL.nl") 967 ("Dutch" "nl" "TUTORIAL.nl")
967 ("Faeroese" "fo") 968 ("Faeroese" "fo")
968 ("Finnish" "fi") 969 ("Finnish" "fi")
969 ("French" "fr" "TUTORIAL.fr" "Bonjour, ,Ag(Ba va?") 970 ("French" "fr" "TUTORIAL.fr" "Bonjour, ,Ag(Ba va?")
1022 nice-charset-1 1023 nice-charset-1
1023 `((charset ascii ,charset) 1024 `((charset ascii ,charset)
1024 (coding-system ,codesys) 1025 (coding-system ,codesys)
1025 (coding-priority ,codesys) 1026 (coding-priority ,codesys)
1026 (native-coding-system ,codesys) 1027 (native-coding-system ,codesys)
1028 (error-sequence-coding-system ,(or error-sequence-coding-system
1029 codesys))
1027 (documentation . ,(if (listp supported-langs) (car supported-langs) 1030 (documentation . ,(if (listp supported-langs) (car supported-langs)
1028 (format "\ 1031 (format "\
1029 Generic language environment for %s (%s)." nice-charset-1 nice-charset-2)))) 1032 Generic language environment for %s (%s)." nice-charset-1 nice-charset-2))))
1030 '("European")) 1033 '("European"))
1031 (loop for (name locale tutorial sample-text input-method) in langenvs 1034 (loop for (name locale tutorial sample-text input-method) in langenvs