comparison lisp/unicode.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 a78d697ccd2c
children 67fbcaf3dbdc
comparison
equal deleted inserted replaced
4488:6b0000935adc 4489:b75b075a9041
609 (frob-unicode-errors-region 609 (frob-unicode-errors-region
610 (lambda (start finish) 610 (lambda (start finish)
611 (translate-region start finish table)) 611 (translate-region start finish table))
612 begin end buffer)) 612 begin end buffer))
613 613
614 ;; Sure would be nice to be able to use defface here.
615 (copy-face 'highlight 'unicode-error-sequence-warning-face)
616
614 (unless (featurep 'mule) 617 (unless (featurep 'mule)
615 ;; We do this in such a roundabout way--instead of having the above defun 618 ;; We do this in such a roundabout way--instead of having the above defun
616 ;; and defvar calls inside a (when (featurep 'mule) ...) form--to have 619 ;; and defvar calls inside a (when (featurep 'mule) ...) form--to have
617 ;; make-docfile.c pick up symbol and function documentation correctly. An 620 ;; make-docfile.c pick up symbol and function documentation correctly. An
618 ;; alternative approach would be to fix make-docfile.c to be able to read 621 ;; alternative approach would be to fix make-docfile.c to be able to read